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