#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s[10];
  string c[10] = {"purple", "green", "blue", "orange", "red", "yellow"};
  string c1[10] = {"Power", "Time", "Space", "Soul", "Reality", "Mind"};
  map<string, string> mp;
  map<string, int> m;
  cin >> n;
  cin.ignore();
  for (int i = 0; i < 6; i++) {
    mp[c[i]] = c1[i];
  }
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    m[s[i]] = 1;
    cnt++;
  }
  cout << 6 - cnt << endl;
  for (int i = 5; i >= 0; i--) {
    if (m[c[i]] == 0) cout << mp[c[i]] << endl;
  }
  return 0;
}
