#include <bits/stdc++.h>
using namespace std;
const int M = 2e5 + 6, MX = 1e9 + 7;
int i, j, cnt, ans;
int a[M], b[M], arr[M];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  string inf[] = {"purple", "green", "blue", "orange", "red", "yellow"};
  string p[] = {"Power", "Time", "Space", "Soul", "Reality", "Mind"};
  vector<string> vs(n);
  for (i = 0; i < n; i++) {
    cin >> vs[i];
  }
  cout << 6 - n << endl;
  for (i = 0; i < n; i++) {
    for (j = 0; j < 6; j++) {
      if (vs[i] == inf[j]) {
        inf[j] = "-1";
        break;
      }
    }
  }
  for (i = 0; i < 6; i++) {
    if (inf[i] != "-1") {
      cout << p[i] << endl;
    }
  }
}
