#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0;
  string c[6] = {"purple", "green", "yellow", "red", "orange", "blue"};
  string name[6] = {"Power", "Time", "Mind", "Reality", "Soul", "Space"};
  int pos[6] = {0};
  cin >> n;
  string color[n];
  for (int i = 0; i < n; i++) {
    cin >> color[i];
  }
  for (int j = 0; j < n; j++) {
    for (int i = 0; i < 6; i++) {
      int x = color[j].compare(c[i]);
      if (x == 0) {
        pos[i] = 1;
        break;
      }
    }
  }
  for (int i = 0; i < 6; i++)
    if (pos[i] == 0) count++;
  cout << count << "\n";
  for (int i = 0; i < 6; i++) {
    if (pos[i] == 0) {
      cout << name[i] << "\n";
    }
  }
  return 0;
}
