#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  string stones[6] = {"Power", "Time", "Space", "Soul", "Reality", "Mind"};
  for (int n = 0; n < N; n++) {
    string str;
    cin >> str;
    if (str == "purple")
      stones[0] = "done";
    else if (str == "green")
      stones[1] = "done";
    else if (str == "blue")
      stones[2] = "done";
    else if (str == "orange")
      stones[3] = "done";
    else if (str == "red")
      stones[4] = "done";
    else
      stones[5] = "done";
  }
  cout << 6 - N << endl;
  for (int i = 0; i < 6; i++) {
    if (stones[i] != "done") cout << stones[i] << endl;
  }
  return 0;
}
