#include <bits/stdc++.h>
using namespace std;
long long int exp(long long int a, long long int b, long long int m);
int ans[100005];
void solve() {
  bool a[6] = {0};
  char b[6] = {'p', 'g', 'b', 'o', 'r', 'y'};
  string stone[6] = {"Power", "Time", "Space", "Soul", "Reality", "Mind"};
  int s;
  cin >> s;
  int ans1 = 6 - s;
  string r;
  for (long long int i = 0; i < s; i++) {
    cin >> r;
    for (long long int j = 0; j < 6; j++) {
      if (b[j] == r[0]) {
        a[j] = true;
        break;
      }
    }
  }
  cout << ans1 << endl;
  for (long long int i = 0; i < 6; i++) {
    if (!a[i]) cout << stone[i] << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
long long int exp(long long int a, long long int b, long long int m) {
  if (b == 0) {
    return 1;
  }
  long long int temp = exp(a, b / 2, m);
  temp = (temp * temp) % m;
  if (b & 1) {
    return (temp * (a % m)) % m;
  }
  return temp;
}
