Interview question on hihoCoder. String ad hoc.