polycarp wants assemble keyboard layout multiple row complicate keyboard consist row 26 lowercase Latin letter arrange orderpolycarp use password s website register bad do not care he want assemble keyboard allow type password easily he do not like finger type password pair adjacent character s adjacent keyboard for example password abacaba layout cabdefghi perfect character c adjacent keyboard b adjacent keyboard it guarantee adjacent equal character s example password password character s adjacentcan help polycarp choose perfect layout keyboard possible