#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  map<string, int> ma;
  map<string, string> p;
  ma["purple"] = 1;
  ma["green"] = 1;
  ma["blue"] = 1;
  ma["orange"] = 1;
  ma["red"] = 1;
  ma["yellow"] = 1;
  p["purple"] = "Power";
  p["green"] = "Time";
  p["blue"] = "Space";
  p["orange"] = "Soul";
  p["red"] = "Reality";
  p["yellow"] = "Mind";
  int n, i;
  string s;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> s;
    ma[s] = 0;
  }
  int ans = 0;
  for (map<string, int>::iterator ite = ma.begin(); ite != ma.end(); ite++)
    if (ite->second == 1) ans++;
  cout << ans << endl;
  if (ans == 0) return 0;
  for (map<string, int>::iterator ite = ma.begin(); ite != ma.end(); ite++)
    if (ite->second == 1) cout << p[ite->first] << endl;
  return 0;
}
