The PDF version of this problem can be downloaded here.
4 aa??bb aaccbb ?a? a??a
3 1 1 1
Migrated from old NTUJ.
2013 ACM Arab Collegiate Programming Contest