I'm assuming the input in each line has to be the same length.
In this case have a list of the input strings and for the length of one of these strings loop.
["abcde", "fghij", "kilmn"] from here here what do you notice about the pattern of the first character from each string? "a" + "f" + "k".