Teams
There are 3·N same year students studying in two specializations - mathematics (M) and programming (P). Let's call students of the first specialization mathematicians and students of the second specialization programmers. There are several groups of each specialization. The number of groups is the same for both specializations. The number of students in each group is greater than or equal to three.
The students are loaded much by the studies, that's why they can meet each other only during classes. They have separate classes for each group except physical education (P. E.). P. E. classes are held for pairs of groups of different specialization and each group share its P. E. classes with only one other group. All groups attend P. E. classes.
All the students are very responsible and attend all the classes. When two students meet each other at the same class, they become familiar.
There is a head in each group. All the group heads attend head meetings, where all of them meet each other and become familiar.
You should form N teams consisting of three students each so that each student is used in exactly one group. There should be at least one mathematician and at least one programmer in each team. All the members of one team should be familiar to each other.
Input
The first line contains 2 integers K and M (1 ≤ K, M ≤ 1000, K = 3·N) - the total number of students and the number of pairs of familiar students correspondingly. The second line contains K characters 'M' or 'P', i-th character describes i-th student's specialization. The following M lines define pairs of familiar students. It's guaranteed that the input describes student's specializations and relationships that do not contradict the problem statement.
Output
The first line should contain Yes or No depending on the possibility to form N teams. If such possibility exists, the following N lines should contain numbers of the students of each team, three numbers in each line. If there are several solutions, output any.