PROGRAMMING:Part 2: running lantern
Sister you broke the first level easily. She was very happy. On the way to the second level, she was laughing at boss one all the time. It's really a big idol. It's good to take out such a weak topic. She really lost his face as a boss! I don't know about boss two. Youyou Xuejie takes her team to a bridge. On the table in front of the bridge, it says:
There is a running lamp on the bridge. Use 0 to indicate that the running lamp is on, and 1 to indicate that the running lamp is not on. In the next second, if the light moves to the right, No.1 light will turn on and off the same as No.8 light, no.2-8 light will turn on and off the same as No.1 light, no.2-7 light will turn on and off the same as no.2-8 light, if the light moves to the left, No.8 light will turn on and off the same as No.1 light, no.1-7 light will turn on and off the same as no.2-8 light. Now I'll give you the initial state of 8 lights and a number n. I'll ask you how the lights turn on and off in N seconds. By the way, let you cross the bridge, wrong, please go to the abyss.
You Xuejie doesn't want to stop cooking. So, come on!!
###Input format:
There are several groups of test data, which are processed to the end of the file. The first behavior is the state of the current running lantern, the second behavior is the time n and the direction of shift, left or right.
###Output format:
Output the status of the running lantern after the shift is completed, and each output occupies one line.
###Input example:
Here is a set of inputs. For example:
```in
01010101
1 Left
01010101
1 Right
00001111
4 Right
```
###Output example:
The corresponding output is given here. For example:
```out
ten million one hundred and one thousand and ten
ten million one hundred and one thousand and ten
eleven million one hundred and ten thousand
```
answer:If there is no answer, please comment
There is a running lamp on the bridge. Use 0 to indicate that the running lamp is on, and 1 to indicate that the running lamp is not on. In the next second, if the light moves to the right, No.1 light will turn on and off the same as No.8 light, no.2-8 light will turn on and off the same as No.1 light, no.2-7 light will turn on and off the same as no.2-8 light, if the light moves to the left, No.8 light will turn on and off the same as No.1 light, no.1-7 light will turn on and off the same as no.2-8 light. Now I'll give you the initial state of 8 lights and a number n. I'll ask you how the lights turn on and off in N seconds. By the way, let you cross the bridge, wrong, please go to the abyss.
You Xuejie doesn't want to stop cooking. So, come on!!
###Input format:
There are several groups of test data, which are processed to the end of the file. The first behavior is the state of the current running lantern, the second behavior is the time n and the direction of shift, left or right.
###Output format:
Output the status of the running lantern after the shift is completed, and each output occupies one line.
###Input example:
Here is a set of inputs. For example:
```in
01010101
1 Left
01010101
1 Right
00001111
4 Right
```
###Output example:
The corresponding output is given here. For example:
```out
ten million one hundred and one thousand and ten
ten million one hundred and one thousand and ten
eleven million one hundred and ten thousand
```
answer:If there is no answer, please comment