2 ā Shift Down 7 1 K( Shift Up Shift Up
2/2 For example, the bit pattern 11111 represents up-shift and the bit pattern 11011 represents down- shift characters. All characters transmitted after the sequence 11111 but before the shifted sequence 11011 are treated as up-shift characters. All characters transmitted after the sequence 11011 are treated as down-shift characters until the pattern 11111 is recognized. Input The input consists of two parts. The first part is the Baudot character set: line one contains the 32 down-shift characters and line two contains the 32 up-shift characters. (Note: spaces are inserted for the shift characters.) The remainder of the input file consists of one or more messages encoded using the Baudot code. Each message will be on a line in the input file. Each line will consist of 1ās and 0ās, with no characters between the bits. There can be up to 80 bits per message. The input file will be terminated by end-of-file. The initial state of each message should be assumed to be in the down-shift state. Output The output should consist of one line of text for each message. The output should contain the character representation, as translated using BAUDOT, of each of the messages. Sample Input <T*O HNM=LRGIPCVEZDBSYFXAWJ UQK >5@9 %,.+)4&80:;3"$?#6!/-2' 71( 100100110011000010011111101110000111110111101 001100001101111001001111100001001100010001100110111100000111 Sample Output DIAL:911 NOV 5, 8AM