Cascading Words
Statement
Goal
Strings can also be affected by gravity !Every character of the string has fallen in a unique line.
Retrieve the original string from the grid of |.
Input
Ligne 1 : Integer N indicating the number of characters in the answer.
N next lines : Grid of characters and of |. Only one character per column and line. A character could be anything (alphanumerical, special character, whitespace), except |.
N next lines : Grid of characters and of |. Only one character per column and line. A character could be anything (alphanumerical, special character, whitespace), except |.
Output
Ligne 1 : String output with word or sentence
Constraints
1 ≤ N ≤ 1024
Example
Input
4 A||| |B|| ||C| |||D
Output
ABCD
Game modes
Fastest, Shortest, Reverse
Test cases
Ordered Grid Test
Input
4
A|||
|B||
||C|
|||D
Output
ABCD
Validator 1 Validator
Input
7
E||||||
|X|||||
||A||||
|||M|||
||||P||
|||||L|
||||||E
Output
EXAMPLE
Unordered Grid Test
Input
4
|||D
||C|
A|||
|B||
Output
ABCD
Validator 2 Validator
Input
9
||||||||Z
|O|||||||
|||||R|||
|||||||A|
||||||B||
|||B|||||
F||||||||
||||A||||
||O||||||
Output
FOOBARBAZ
Alphanumeric chars with Punctuation Test
Input
72
||||||G|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|B||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||D||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||d||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||v||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||5||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||s|||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||z||||||||||||||||||||
||||||||||||||||||||||||||||||||||i|||||||||||||||||||||||||||||||||||||
||C|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||8|||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||/||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||@||||||||
|||||||||||||||P||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||F||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||?|||||||
||||||||I|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||3||||||||||||||||
||||||||||||||||||||||||||||||||||||||m|||||||||||||||||||||||||||||||||
||||||||||||||||||||||W|||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||7||||||||||||
|||||||||||||||||||||||||||||||f||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||l||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||Y|||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||w|||||||||||||||||||||||
||||||||||||||||||||||||||||||e|||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)||
|||||||||||||||||||||||||Z||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||x||||||||||||||||||||||
||||||||||||||||||S|||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||L||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||O|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||9||||||||||
||||||||||||||||||||||||||||||||||||||||||q|||||||||||||||||||||||||||||
|||||||H||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||r||||||||||||||||||||||||||||
|||||||||||||||||||T||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||V||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||J||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||u|||||||||||||||||||||||||
|||||||||||||||||||||||X||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||a|||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||Q|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||1||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||4|||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||0|||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||o|||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*
||||||||||K|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||(|||
|||||||||||||||||||||||||||b||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||t||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||j||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||c|||||||||||||||||||||||||||||||||||||||||||
||||E|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||$|||||
|||||||||||||||||R||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||&|
||||||||||||M|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||g|||||||||||||||||||||||||||||||||||||||
|||||||||||||N||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||k|||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||%||||||
|||||||||||||||||||||||||||||||||||||||||p||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||y|||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||2|||||||||||||||||
|||||||||||||||||||||||||||||||||h||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||n||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||!|||||||||
||||||||||||||||||||U|||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||6|||||||||||||
Output
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@?%$/()&*
Validator 3 Validator
Input
56
|||||||||||||||||||||||||||||||||||||||||||||s||||||||||
||||||||||||||||||||||||||||c|||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||| |||||
||||| ||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||,|||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||.
|||||||||||||||o||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||i||
||||m|||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||c||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||i||||||||
||||||||||||d|||||||||||||||||||||||||||||||||||||||||||
L|||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||| ||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||i|||||||||||
|||||||||||||||||||||||||||||||||||e||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||e||||
|||||||||||||||||||||||||||||||||||||u||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||p||||||||||||
||||||||||||||||||||| ||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||t|||||||||||||||||||
|||||||||||||||||||||||||||||||s||||||||||||||||||||||||
|||||||||||||||||||||||||||||o||||||||||||||||||||||||||
|||||||||||||o||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||n|||||||
||||||i|||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||t|||||||||||||||||||||||||||||||||||
|||e||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||| ||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||a|||||||||||||||
||||||||||||||||||||||||||| ||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||r|||||||||||||||||
||||||||s|||||||||||||||||||||||||||||||||||||||||||||||
|o||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||u||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||l|||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||i|||||||||||||
||||||||||||||||||s|||||||||||||||||||||||||||||||||||||
||||||||||||||||| ||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||m||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||c|||||||||
|||||||||||||||||||||||||t||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||e|||||||||||||||||||||||
||||||||||||||||||||||||e|||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||d||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||l|||
||||||||||||||||||||||||||||||||||||||||||||||||||||||t|
|||||||||||||||||||||||||||||||||||||||||||||||||g||||||
|||||||p||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||m|||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||n|||||||||||||||||||||||||
||||||||||||||||r|||||||||||||||||||||||||||||||||||||||
||r|||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||t|||||||||||||||||||||
|||||||||||||||||||i||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||a|||||||||||||||||||||||||||||||||
Output
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sentence Test
Input
14
||||||||o|||||
|||||||||||| |
||||||||||l|||
H|||||||||||||
|e||||||||||||
|||||||W||||||
||l|||||||||||
|||l||||||||||
|||||||||||||!
|||||| |||||||
|||||||||||d||
|||||,||||||||
||||o|||||||||
|||||||||r||||
Output
Hello, World !
Validator 4 Validator
Input
47
||||||&||||||||||||||||||||||||||||||||||||||||
||||||||||||||| |||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||i||||||||||||
|||||||||||||||||||d|||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||t|||||||||||
||||||||||||||||||||||||||||||||||||||||||| |||
||||||||||| |||||||||||||||||||||||||||||||||||
|||c|||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||s||||||||||||||||||||
|||||||||||||||||||||||||||||||s|||||||||||||||
||||||||||||||||||||||||||||a||||||||||||||||||
|||||||||||||||||e|||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||h|||||||
||||| |||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||| ||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||y
|||||||||o|||||||||||||||||||||||||||||||||||||
||||||||||||||||||n||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||e|
|||||||||||||||||||||||||e|||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||t||||||||
||||||||||||||||||||i||||||||||||||||||||||||||
||||||||||||||||||||||||m||||||||||||||||||||||
|l|||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||e||||||||||||||||||||||||||||||||
|||||||||||||||||||||n|||||||||||||||||||||||||
||||||| |||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||| |||||||||||||||||||||||
|||||||||||||||||||||||||||||||||w|||||||||||||
||||||||||||||||||||||||||||||||||||h||||||||||
||i||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||r|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||k||
A||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||| |||||||||
||||||||||||||||||||||||||||||||||||||||e||||||
||||||||||||a||||||||||||||||||||||||||||||||||
||||||||||||||||||||||g||||||||||||||||||||||||
||||||||||b||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||e||||||||||||||||
|||||||||||||||||||||||||||||g|||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||i|||||
|||||||||||||||||||||||||||s|||||||||||||||||||
||||e||||||||||||||||||||||||||||||||||||||||||
||||||||B||||||||||||||||||||||||||||||||||||||
||||||||||||||||s||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||r||||
Output
Alice & Bob are sending messages with their key
Solution language
Solution
Stub generator input