import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();
String[] str = new String[n];
for (int i = 0; i < n; i++) {
str[i] = sc.next();
}
Map<String,String> map = new HashMap();
map.put("purple","Power");
map.put("green","Time");
map.put("blue","Space");
map.put("orange","Soul");
map.put("red","Reality");
map.put("yellow","Mind");
Set set = map.keySet();
int cnt = 0;
for (int i = 0; i < n; i++) {
if(set.contains(str[i]) == true){
cnt++;
}
}
System.out.println(6-cnt);
String[] s = {"purple","green","blue","orange","red","yellow"};
for (int i = 0; i < 6; i++) {
for (int j = 0; j < n; j++) {
if(str[j].equals(s[i]) == true){
s[i] = "";
break;
}
}
}
for (int i = 0; i < 6; i++) {
if(s[i] != ""){
for (String key: map.keySet()) {
if(s[i].equals(key) == true){
System.out.println(map.get(key));
}
}
}
}
}
}
}
CodeForces-987A
最新推荐文章于 2024-08-20 14:34:44 发布