PROGRAMMING:Joseph problem with password
Joseph's problem with password: n people with numbers of 1, 2,..., n sit around in a clockwise direction, and each person has his own number (positive integer), name and password (positive integer). At the beginning, select a positive integer as the upper limit value of the number, start counting clockwise from the first person, and stop counting when the number reaches M. The person who reports m goes out, takes his password as the new m value, starts to count again from the next person in the clockwise direction, and so on, until all the people are out of the team. Design a program to find out the order of the team.
###Input format:
Input the number of people n (1 ≤ n ≤ 50), then input the information of each person line by line (separated by commas), and then input the upper limit value M.
###Output format:
Output each person's information line by line according to the order of leaving the team. Each person has one line of information, and the data items are separated by commas
###Input example:
Here is a set of inputs. For example:
```in
five
1, Liu San, 3
2, Li Li, 5
3, Wu Yong, 8
4, more money, 2
5, Qi Min, 4
two
```
###Output example:
The corresponding output is given here. For example:
```out
2, Li Li, 5
3, Wu Yong, 8
5, Qi Min, 4
4, more money, 2
1, Liu San, 3
```
answer:If there is no answer, please comment
###Input format:
Input the number of people n (1 ≤ n ≤ 50), then input the information of each person line by line (separated by commas), and then input the upper limit value M.
###Output format:
Output each person's information line by line according to the order of leaving the team. Each person has one line of information, and the data items are separated by commas
###Input example:
Here is a set of inputs. For example:
```in
five
1, Liu San, 3
2, Li Li, 5
3, Wu Yong, 8
4, more money, 2
5, Qi Min, 4
two
```
###Output example:
The corresponding output is given here. For example:
```out
2, Li Li, 5
3, Wu Yong, 8
5, Qi Min, 4
4, more money, 2
1, Liu San, 3
```
answer:If there is no answer, please comment