#include <iostream>
#include <stdio.h>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;

int HelloWorld() {
  cout << "Hello World" << endl;
  return 0;
}

int XCubic() {
  int x;
  cin >> x;
  if (1 <= x && x <= 100) {
    x = x * x * x;
    cout << x << endl;
    return 0;
  }
  return 1;
}

int Rectangle() {
  int a, b, area, perimeter;

  cin >> a >> b;
  if (1 <= a && b <= 100) {
    area = a * b;
    perimeter = (a + b) * 2;
    cout << area << " " << perimeter << endl;
    return 0;
  }
  return 1;
}

int Watch() {
  int S;
  cin >> S;

  int D = 60;
  int s = S % D;
  int m = (S / D) % D;
  int h = (S / D) / D;
  if (0 <= S && S <= 86400) {
    printf("%u:%u:%u\\n", h, m, s);
    return 0;
  }

  return 1;
}

int SmallLargeOrEqual() {
  int a, b;
  cin >> a >> b;
  if (!(a <= a && b <= 1000))
    return 1;
  if (a < b)
    cout << "a < b" << endl;
  else if (a > b)
    cout << "a > b" << endl;
  else
    cout << "a == b" << endl;
  return 0;
}

int Range() {
  int a, b, c;
  bool flag = true;

  cin >> a >> b >> c;
  if (!(0 <= a && a <= 100))
    return 1;
  if (!(0 <= b && b <= 100))
    return 1;
  if (!(0 <= c && c <= 100))
    return 1;

  if (!(a < b))
    flag = false;
  if (!(b < c))
    flag = false;

  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

int SortingThreeNumbers() {
  int a, b, c, temp;
  cin >> a >> b >> c;

  if (!(1 <= a && a <= 10000))
    return 1;
  if (!(1 <= b && b <= 10000))
    return 1;
  if (!(1 <= c && c <= 10000))
    return 1;

  if (a > b) {
    temp = a;
    a = b;
    b = temp;
  }
  if (b > c) {
    temp = b;
    b = c;
    c = temp;
  }
  if (a > b) {
    temp = a;
    a = b;
    b = temp;
  }

  printf("%u %u %u\\n", a, b, c);

  return 0;
}

int CircleInARectangle() {
  int W, H, x, y, r;
  bool flag = true;
  cin >> W >> H >> x >> y >> r;
  if (!(-100 <= x && x <= 100))
    return 1;
  if (!(-100 <= y && y <= 100))
    return 1;
  if (!(0 <= W && W <= 100))
    return 1;
  if (!(0 <= H && H <= 100))
    return 1;
  if (!(0 <= r && r <= 100))
    return 1;

  if ((x - r) < 0)
    flag = false;
  if ((y - r) < 0)
    flag = false;
  if (W < (x + r))
    flag = false;
  if (H < (y + r))
    flag = false;

  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

int PrintManyHelloWorld() {
  for (int i = 0; i < 1000; i++) {
    HelloWorld();
  }
  return 0;
}

int PrintTestCases() {
  int x, i = 1;

  while (1) {
    cin >> x;
    if (x == 0)
      break;
    cout << "Case " << i++ << ": " << x << endl;
  }

  return 0;
}

int SwappingTwoNumbers() {
  int x, y, temp;

  for (int i = 0;; i++) {
    cin >> x >> y;
    if (x == 0 && y == 0)
      break;
    if (x > y) {
      temp = x;
      x = y;
      y = temp;
    }
    cout << x << " " << y << endl;
  }
  return 0;
}

int HowManyDivisors() {
  int a, b, c, count;
  cin >> a >> b >> c;
  count = 0;
  for (a; a <= b; a++) {
    if (c % a == 0)
      count++;
  }
  cout << count << endl;
  return 0;
}

int ADivideBProbrem() {
  int a, b;
  double c;
  cin >> a >> b;
  c = ((double)a / (double)b);
  printf("%u %u %lf\\n", a / b, a % b, c);
  return 0;
}

int Circle() {
  double r, area, perimeter;
  cin >> r;

  area = r * r * M_PI;
  perimeter = r * 2.0 * M_PI;
  printf("%lf %lf", area, perimeter);
  return 0;
}

int SimpleCalculator() {
  int a, b, z;
  char c;

  for (int i = 0;; i++) {
    cin >> a >> c >> b;
    if (c == '?')
      return 1;
    switch (c) {
    case '+':
      z = a + b;
      break;
    case '-':
      z = a - b;
      break;
    case '*':
      z = a * b;
      break;
    case '/':
      z = a / b;
      break;
    }
    printf("%d\\n", z);
  }
  return 0;
}

int MinMaxAndSum() {

  unsigned short int n, i;
  int a, min, max;
  long int sum;
  min = NULL;
  max = NULL;
  sum = 0;

  cin >> n;

  for (i = 0; i < n; i++) {
    cin >> a;
    if (a < min || min == NULL)
      min = a;
    if (max < a || max == NULL)
      max = a;
    sum += a;
  }
  cout << min << " " << max << " " << sum << endl;

  return 0;
}

int PrintARectangle() {
  unsigned short int H, W, i, j;

  while (1) {
    cin >> H >> W;
    if (H == 0 && W == 0)
      return 1;
    for (i = 0; i < H; i++) {
      for (j = 0; j < W; j++) {
        cout << '#' << flush;
      }
      cout << endl;
    }
    cout << endl;
  }
  return 0;
}

int PrintAFrame() {
  unsigned short int H, W, i, j;

  while (1) {
    cin >> H >> W;
    if (H == 0 && W == 0)
      return 1;
    for (i = 0; i < H; i++) {
      for (j = 0; j < W; j++) {
        if (i == 0 || i == H - 1 || j == 0 || j == W - 1)
          cout << '#' << flush;
        else
          cout << '.' << flush;
      }
      cout << endl;
    }
    cout << endl;
  }
  return 0;
}

int PrintAChessboard() {
  unsigned short int H, W, i, j;

  while (1) {
    cin >> H >> W;
    if (H == 0 && W == 0)
      return 1;
    for (i = 0; i < H; i++) {
      for (j = 0; j < W; j++) {
        if ((i % 2) == 0) {
          if ((j % 2) == 0)
            cout << '#' << flush;
          else
            cout << '.' << flush;
        } else {
          if ((j % 2) == 1)
            cout << '#' << flush;
          else
            cout << '.' << flush;
        }
      }
      cout << endl;
    }
    cout << endl;
  }
  return 0;
}

int StructuredProgramming() {
  int n;
  cin >> n;
  int i = 1;

  for (i; i <= n; i++) {
    int x = i;
    if (x % 3 == 0)
      cout << " " << i;
    else {
      while (x) {
        if (x % 10 == 3) {
          cout << " " << i;
          break;
        } else {
          x /= 10;
        }
      }
    }
  }
  cout << endl;
  return 0;
}

int ReversingNumbers() {
  unsigned short int n, i;
  cin >> n;
  unsigned int a[100];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }

  for (i = n - 1; i >= 0; i--) {
    cout << a[i] << " ";
  }
  cout << endl;

  return 0;
}

int BubleSort() {
  unsigned short int n, i, j, temp;
  cin >> n;
  unsigned int a[100];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }

  for (i = 0; i < n - 1; i++) {
    for (j = n - 1; j > i; j--) {
      if (a[j - 1] > a[j]) {
        temp = a[j - 1];
        a[j - 1] = a[j];
        a[j] = temp;
      }
    }
  }

  for (i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
  return 0;
}

int main() {
  // HelloWorld();
  // XCubic();
  // Rectangle();
  // Watch();
  // SmallLargeOrEqual();
  // Range();
  // SortingThreeNumbers();
  // CircleInARectangle();
  // PrintManyHelloWorld();
  // PrintTestCases();
  // SwappingTwoNumbers();
  // HowManyDivisors();
  // ADivideBProbrem();
  // Circle();
  // SimpleCalculator();
  // MinMaxAndSum();
  // PrintARectangle();
  // PrintAFrame();
  // PrintAChessboard();
  // StructuredProgramming();
  ReversingNumbers();
  return 0;
}

#include <iostream>
#include <stdio.h>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;

int HelloWorld() {
  cout << "Hello World" << endl;
  return 0;
}

int XCubic() {
  int x;
  cin >> x;
  if (1 <= x && x <= 100) {
    x = x * x * x;
    cout << x << endl;
    return 0;
  }
  return 1;
}

int Rectangle() {
  int a, b, area, perimeter;

  cin >> a >> b;
  if (1 <= a && b <= 100) {
    area = a * b;
    perimeter = (a + b) * 2;
    cout << area << " " << perimeter << endl;
    return 0;
  }
  return 1;
}

int Watch() {
  int S;
  cin >> S;

  int D = 60;
  int s = S % D;
  int m = (S / D) % D;
  int h = (S / D) / D;
  if (0 <= S && S <= 86400) {
    printf("%u:%u:%u\\n", h, m, s);
    return 0;
  }

  return 1;
}

int SmallLargeOrEqual() {
  int a, b;
  cin >> a >> b;
  if (!(a <= a && b <= 1000))
    return 1;
  if (a < b)
    cout << "a < b" << endl;
  else if (a > b)
    cout << "a > b" << endl;
  else
    cout << "a == b" << endl;
  return 0;
}

int Range() {
  int a, b, c;
  bool flag = true;

  cin >> a >> b >> c;
  if (!(0 <= a && a <= 100))
    return 1;
  if (!(0 <= b && b <= 100))
    return 1;
  if (!(0 <= c && c <= 100))
    return 1;

  if (!(a < b))
    flag = false;
  if (!(b < c))
    flag = false;

  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

int SortingThreeNumbers() {
  int a, b, c, temp;
  cin >> a >> b >> c;

  if (!(1 <= a && a <= 10000))
    return 1;
  if (!(1 <= b && b <= 10000))
    return 1;
  if (!(1 <= c && c <= 10000))
    return 1;

  if (a > b) {
    temp = a;
    a = b;
    b = temp;
  }
  if (b > c) {
    temp = b;
    b = c;
    c = temp;
  }
  if (a > b) {
    temp = a;
    a = b;
    b = temp;
  }

  printf("%u %u %u\\n", a, b, c);

  return 0;
}

int CircleInARectangle() {
  int W, H, x, y, r;
  bool flag = true;
  cin >> W >> H >> x >> y >> r;
  if (!(-100 <= x && x <= 100))
    return 1;
  if (!(-100 <= y && y <= 100))
    return 1;
  if (!(0 <= W && W <= 100))
    return 1;
  if (!(0 <= H && H <= 100))
    return 1;
  if (!(0 <= r && r <= 100))
    return 1;

  if ((x - r) < 0)
    flag = false;
  if ((y - r) < 0)
    flag = false;
  if (W < (x + r))
    flag = false;
  if (H < (y + r))
    flag = false;

  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

int PrintManyHelloWorld() {
  for (int i = 0; i < 1000; i++) {
    HelloWorld();
  }
  return 0;
}

int PrintTestCases() {
  int x, i = 1;

  while (1) {
    cin >> x;
    if (x == 0)
      break;
    cout << "Case " << i++ << ": " << x << endl;
  }

  return 0;
}

int SwappingTwoNumbers() {
  int x, y, temp;

  for (int i = 0;; i++) {
    cin >> x >> y;
    if (x == 0 && y == 0)
      break;
    if (x > y) {
      temp = x;
      x = y;
      y = temp;
    }
    cout << x << " " << y << endl;
  }
  return 0;
}

int HowManyDivisors() {
  int a, b, c, count;
  cin >> a >> b >> c;
  count = 0;
  for (a; a <= b; a++) {
    if (c % a == 0)
      count++;
  }
  cout << count << endl;
  return 0;
}

int ADivideBProbrem() {
  int a, b;
  double c;
  cin >> a >> b;
  c = ((double)a / (double)b);
  printf("%u %u %lf\\n", a / b, a % b, c);
  return 0;
}

int Circle() {
  double r, area, perimeter;
  cin >> r;

  area = r * r * M_PI;
  perimeter = r * 2.0 * M_PI;
  printf("%lf %lf", area, perimeter);
  return 0;
}

int SimpleCalculator() {
  int a, b, z;
  char c;

  for (int i = 0;; i++) {
    cin >> a >> c >> b;
    if (c == '?')
      return 1;
    switch (c) {
    case '+':
      z = a + b;
      break;
    case '-':
      z = a - b;
      break;
    case '*':
      z = a * b;
      break;
    case '/':
      z = a / b;
      break;
    }
    printf("%d\\n", z);
  }
  return 0;
}

int MinMaxAndSum() {

  unsigned short int n, i;
  int a, min, max;
  long int sum;
  min = NULL;
  max = NULL;
  sum = 0;

  cin >> n;

  for (i = 0; i < n; i++) {
    cin >> a;
    if (a < min || min == NULL)
      min = a;
    if (max < a || max == NULL)
      max = a;
    sum += a;
  }
  cout << min << " " << max << " " << sum << endl;

  return 0;
}

int PrintARectangle() {
  unsigned short int H, W, i, j;

  while (1) {
    cin >> H >> W;
    if (H == 0 && W == 0)
      return 1;
    for (i = 0; i < H; i++) {
      for (j = 0; j < W; j++) {
        cout << '#' << flush;
      }
      cout << endl;
    }
    cout << endl;
  }
  return 0;
}

int PrintAFrame() {
  unsigned short int H, W, i, j;

  while (1) {
    cin >> H >> W;
    if (H == 0 && W == 0)
      return 1;
    for (i = 0; i < H; i++) {
      for (j = 0; j < W; j++) {
        if (i == 0 || i == H - 1 || j == 0 || j == W - 1)
          cout << '#' << flush;
        else
          cout << '.' << flush;
      }
      cout << endl;
    }
    cout << endl;
  }
  return 0;
}

int PrintAChessboard() {
  unsigned short int H, W, i, j;

  while (1) {
    cin >> H >> W;
    if (H == 0 && W == 0)
      return 1;
    for (i = 0; i < H; i++) {
      for (j = 0; j < W; j++) {
        if ((i % 2) == 0) {
          if ((j % 2) == 0)
            cout << '#' << flush;
          else
            cout << '.' << flush;
        } else {
          if ((j % 2) == 1)
            cout << '#' << flush;
          else
            cout << '.' << flush;
        }
      }
      cout << endl;
    }
    cout << endl;
  }
  return 0;
}

int StructuredProgramming() {
  int n;
  cin >> n;
  int i = 1;

  for (i; i <= n; i++) {
    int x = i;
    if (x % 3 == 0)
      cout << " " << i;
    else {
      while (x) {
        if (x % 10 == 3) {
          cout << " " << i;
          break;
        } else {
          x /= 10;
        }
      }
    }
  }
  cout << endl;
  return 0;
}

int ReversingNumbers() {
  int n, i;
  cin >> n;
  unsigned int a[100];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }

  cout << a[n - 1];
  for (i = (n - 2); i >= 0; i--) {
    cout << " " << a[i];
  }
  cout << endl;

  return 0;
}

int BubleSort() {
  unsigned short int n, i, j, temp;
  cin >> n;
  unsigned int a[100];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }

  for (i = 0; i < n - 1; i++) {
    for (j = n - 1; j > i; j--) {
      if (a[j - 1] > a[j]) {
        temp = a[j - 1];
        a[j - 1] = a[j];
        a[j] = temp;
      }
    }
  }

  for (i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
  return 0;
}

int main() {
  // HelloWorld();
  // XCubic();
  // Rectangle();
  // Watch();
  // SmallLargeOrEqual();
  // Range();
  // SortingThreeNumbers();
  // CircleInARectangle();
  // PrintManyHelloWorld();
  // PrintTestCases();
  // SwappingTwoNumbers();
  // HowManyDivisors();
  // ADivideBProbrem();
  // Circle();
  // SimpleCalculator();
  // MinMaxAndSum();
  // PrintARectangle();
  // PrintAFrame();
  // PrintAChessboard();
  // StructuredProgramming();
  ReversingNumbers();
  return 0;
}


#include <stdio.h>

int main(void) {
  int i, n;
  int arr[] = {};

  scanf("%d", &n);

  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }

  for (i = 0; i < (n / 2); i++) {
    int temp = arr[i];
    arr[i] = arr[(n - 1) - i];
    arr[(n - 1) - i] = temp;
  }

  for (i = 0; i < n; i++) {
    if (i) {
      printf(" ");
    }
    printf("%d", arr[i]);
  }
  printf("\\n");
  return 0;
}

#include <stdio.h>

int main(void) {
  int i, n;
  int arr[100] = {0};

  scanf("%d", &n);

  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }

  for (i = 0; i < (n / 2); i++) {
    int temp = arr[i];
    arr[i] = arr[(n - 1) - i];
    arr[(n - 1) - i] = temp;
  }

  for (i = 0; i < n; i++) {
    if (i) {
      printf(" ");
    }
    printf("%d", arr[i]);
  }
  printf("\\n");
  return 0;
}

*** stack smashing detected ***: terminated


#include <iostream>
using namespace std;

int main() {
  int k;
  int a[k];

  cin >> k;

  for (int i = 0; i < k; i++) {
    cin >> a[i];
  }

  for (int i = 0; i < k; i++) {
    a[i] = a[k - i];
  }
  cout << a[k] << endl;

  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int k, a[100];

  cin >> k;

  for (int i = 0; i < k; i++) {
    cin >> a[i];
  }

  for (int i = k - 1; i >= 0; i--) {
    if (i != k - 1)
      cout << " ";
    cout << a[i];
  }
  cout << endl;

  return 0;
}


#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int n;
int main() {
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    a.push_back(a[i]);
  }
  reverse(a.begin(), a.end());
  for (int j = 0; j < n; ++j) {
    if (j < n - 1) {
      cout << a[j] << " ";
    } else {
      cout << a[n - 1];
    }
  }
  cout << endl;
  return 0;
}

#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int n;
int main() {
  cin >> n;
  int a1 = 0;
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    cin >> a1;
    a.push_back(a1);
  }
  reverse(a.begin(), a.end());
  for (int j = 0; j < n; ++j) {
    if (j < n - 1) {
      cout << a[j] << " ";
    } else {
      cout << a[n - 1];
    }
  }
  cout << endl;
  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int n, num[n], num2[n];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> num[i];
    for (int j = 0; j < n; j++) {
      num2[j] = num[i];
      i--;
      cout << num2[j] << endl;
    }
  }

  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int n, num[100];
  cin >> n;

  for (int i = 0; i < n; i++)
    cin >> num[i];
  for (int i = n - 1; i >= 0; i--) {
    if (i != n - 1)
      cout << " ";
    cout << num[i];
  }
  cout << endl;
  return 0;
}


#include "iostream"
using namespace std;

int main() {
  int n;
  cin >> n;
  int a[100];
  for (size_t i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (size_t i = n - 1; i >= 0; i--) {
    if (i > 0) {
      cout << " " << a[i];
    } else {
      cout << a[i];
    }
  }
  return 0;
}

#include "iostream"
using namespace std;

int main() {
  int n;
  cin >> n;
  int a[100];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = n - 1; i >= 0; i--) {
    if (i > 0) {
      cout << a[i] << " ";
    } else {
      cout << a[i];
    }
  }
  cout << endl;
  return 0;
}


#include <iostream>
#include <vector>
using namespace std;

int main() {

  int num, rp;
  int ans;
  cin >> num;
  vector<int> data;

  for (int i = 0; i < num; i++) {
    cin >> data[i];
  }

  for (int i = num - 1; i == 0; i--) {
    cout << data[i];
  }
  return 0;
}

#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
  int num;
  int data[100];
  scanf("%d", &num);

  for (int i = 0; i < num; i++) {
    scanf("%d", &data[i]);
  }

  for (int i = num - 1; i > -1; i--) {
    if (i == num - 1) {
      cout << data[i];
    } else {
      cout << " " << data[i];
    }
  }
  printf("\\n");
  return 0;
}


#include <iostream>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
using namespace std;
int main() {
  int n;
  vector<int> in(n);
  rep(i, n) cin >> in[i];
  rep(i, n - 1) cout << in[n - i - 1] << " ";
  cout << in[0] << endl;
}

#include <iostream>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> in(n);
  rep(i, n) cin >> in[i];
  rep(i, n - 1) cout << in[n - i - 1] << " ";
  cout << in[0] << endl;
}


#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;

int main() {
  int n, m;
  int maximum;
  int a[1000];
  while (true) {
    cin >> n >> m;
    if (n == 0 && m == 0)
      break;
    maximum = 0;
    for (int j = 0; j < n; j++) {
      cin >> a[j];
    }
    for (int j = 0; j < n - 1; j++) {
      for (int t = j + 1; t < n; t++) {
        if (a[j] + a[t] <= m) {
          maximum = max(maximum, a[j] + a[t]);
        }
      }
    }
    if (maximum == 0) {
      cout << "NONE" << endl;
    } else {
      cout << maximum << endl;
    }
  }
}

#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++)
    cin >> a[i];
  for (int i = n - 1; 0 < i; i--)
    cout << a[i] << " ";
  cout << a[0] << endl;
}


#include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++)
    cin >> a[i];
  for (int i = n - 1; i > 0; i++)
    cout << a[i] << " ";
  cout << a[0] << endl;
}

#include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++)
    cin >> a[i];
  for (int i = n - 1; i > 0; i--)
    cout << a[i] << " ";
  cout << a[0] << endl;
}


#include <iostream>
#include <vector>
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> numbers(n - 1);
  for (int i = 0; i < n; i++) {
    cin >> numbers[i];
  }
  for (int i = n; i > 1; i--) {
    cout << numbers[i - 1] << ' ';
  }
  cout << numbers[0] << endl;

  return 0;
}

#include <iostream>
#include <vector>
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> numbers(n);
  for (int i = 0; i < n; i++) {
    cin >> numbers[i];
  }
  for (int i = n; i > 1; i--) {
    cout << numbers[i - 1] << ' ';
  }
  cout << numbers[0] << endl;

  return 0;
}


#include <stdio.h>

int main(void) {
  int n, i, j, k;
  scanf("%d", &n);
  int retsu[n];
  for (i = 1; i <= n; i++) {
    k = n - i;
    scanf("%d", retsu[k]);
  }
  for (j = 0; j < n; j++) {
    printf("%d ", retsu[j]);
  }
  printf("\\n");
  return 0;
}

#include <stdio.h>

int main(void) {
  int n, i, j, k;
  scanf("%d", &n);
  int retsu[n];
  for (i = 1; i <= n; i++) {
    k = n - i;
    scanf("%d", &retsu[k]);
  }
  for (j = 0; j < n; j++) {
    if (j)
      printf(" ");
    printf("%d", retsu[j]);
  }
  printf("\\n");
  return 0;
}


#include <algorithm>
#include <cstdio>
#include <functional>

using namespace std;

int main() {
  int n;
  scanf("%d", &n);

  int array[n];
  for (int i = 0; i < n; i++) {
    scanf(" %d", &array[i]);
  }

  for (int i = n - 1; i >= 0; i++) {
    if (i != 0) {
      printf("%d ", array[i]);
    } else {
      printf("%d\\n");
    }
  }
  return 0;
}

#include <algorithm>
#include <cstdio>
#include <functional>

using namespace std;

int main() {
  int n;
  scanf("%d", &n);

  int array[n];
  for (int i = 0; i < n; i++) {
    scanf(" %d", &array[i]);
  }

  for (int i = n - 1; i >= 0; i--) {
    if (i != 0) {
      printf("%d ", array[i]);
    } else {
      printf("%d\\n", array[i]);
    }
  }
  return 0;
}


#include <iostream>

using namespace std;

int main() {

  int n;
  int a[n];
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = n; i > 1; i--) {
    cout << a[i] << " ";
  }
  cout << a[1] << endl;
}

#include <iostream>

using namespace std;

int main() {
  int n;
  cin >> n;
  int a[100];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = n; i > 1; i--) {
    cout << a[i] << " ";
  }
  cout << a[1] << endl;
}


#include <iostream>
#include <vector>
using namespace std;

int main() {
  int n, s;
  vector<int> a;
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n / 2; i++) {
    s = a[i];
    a[i] = a[n - i];
    a[n - i] = s;
  }
  for (int i = 0; i < n; i++) {
    if (i == n - 1)
      cout << a[i] << endl;
    else
      cout << a[i] << " ";
  }
  return 0;
}

#include <iostream>
#include <vector>
using namespace std;

int main() {
  int n, s;
  vector<int> a;
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n / 2; ++i) {
    s = a[i];
    a[i] = a[n - 1 - i];
    a[n - 1 - i] = s;
  }
  for (int i = 0; i < n; i++) {
    if (i == n - 1)
      cout << a[i] << endl;
    else
      cout << a[i] << " ";
  }
  return 0;
}


#define _USE_MATH_DEFINES

#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;

#define ll long long
const int MOD = 1000000007; // 10^9+7
const string SPACE = " ";

ll max(ll a, ll b) {

  if (a > b)
    return a;
  else
    return b;
}
double max(double a, double b) {

  if (a > b)
    return a;
  else
    return b;
}
// a??¨b?????§?????????

ll min(ll a, ll b) {

  if (a < b)
    return a;
  else
    return b;
}
// a??¨b????°??????????

ll avd_i(ll a, ll b) {

  if (a > b)
    return a - b;
  else
    return b - a;
}
double avd_d(double a, double b) {

  double re;
  if (a > b)
    re = a - b;
  else
    re = b - a;
  return re;
}
// a??¨b???????????¶??????

ll powsur(ll a, ll b, ll p) {

  if (b == 0) {

    return 1;

  } else if (b % 2 == 0) {

    ll d = powsur(a, b / 2, p);
    return ((d % p) * (d % p)) % p;

  } else {

    return ((a % p) * powsur(a, b - 1, p) % p) % p;
  }
}
// p????´???°,a???b??????p??§?????£?????????

ll CMOD(ll n, ll r, ll p) {

  ll a = 1, b = 1, c = 1, re;
  for (int i = 1; i <= n; i++) {

    a *= i;
    a = a % p;
  }
  for (int i = 1; i <= r; i++) {

    b *= i;
    b = b % p;
  }
  for (int i = 1; i <= n - r; i++) {

    c *= i;
    c = c % p;
  }
  b = powsur(b, p - 2, p);
  c = powsur(c, p - 2, p);
  re = ((a % p) * (b % p)) % p;
  re = ((re % p) * c % p) % p;

  return re;
}
// p????´???°,(nCr)%p

ll gcd(ll a, ll b) {

  if (a > b) {

    ll tmp = a;
    a = b;
    b = tmp;
  }
  ll r;
  r = b % a;
  if (r == 0)
    return a;
  else
    return gcd(r, a);
}
//?????§??¬?´???°

ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
//????°???¬?????°

int main() {

  int n, a[105];

  cin >> n;
  for (int i = 0; i < n; i++) {

    cin >> a[i];
  }
  for (int i = n - 1; i >= 1; i++) {

    cout << a[i] << " ";
  }
  cout << a[0] << endl;

  return 0;
}

#define _USE_MATH_DEFINES

#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;

#define ll long long
const int MOD = 1000000007; // 10^9+7
const string SPACE = " ";

ll max(ll a, ll b) {

  if (a > b)
    return a;
  else
    return b;
}
double max(double a, double b) {

  if (a > b)
    return a;
  else
    return b;
}
// a??¨b?????§?????????

ll min(ll a, ll b) {

  if (a < b)
    return a;
  else
    return b;
}
// a??¨b????°??????????

ll avd_i(ll a, ll b) {

  if (a > b)
    return a - b;
  else
    return b - a;
}
double avd_d(double a, double b) {

  double re;
  if (a > b)
    re = a - b;
  else
    re = b - a;
  return re;
}
// a??¨b???????????¶??????

ll powsur(ll a, ll b, ll p) {

  if (b == 0) {

    return 1;

  } else if (b % 2 == 0) {

    ll d = powsur(a, b / 2, p);
    return ((d % p) * (d % p)) % p;

  } else {

    return ((a % p) * powsur(a, b - 1, p) % p) % p;
  }
}
// p????´???°,a???b??????p??§?????£?????????

ll CMOD(ll n, ll r, ll p) {

  ll a = 1, b = 1, c = 1, re;
  for (int i = 1; i <= n; i++) {

    a *= i;
    a = a % p;
  }
  for (int i = 1; i <= r; i++) {

    b *= i;
    b = b % p;
  }
  for (int i = 1; i <= n - r; i++) {

    c *= i;
    c = c % p;
  }
  b = powsur(b, p - 2, p);
  c = powsur(c, p - 2, p);
  re = ((a % p) * (b % p)) % p;
  re = ((re % p) * c % p) % p;

  return re;
}
// p????´???°,(nCr)%p

ll gcd(ll a, ll b) {

  if (a > b) {

    ll tmp = a;
    a = b;
    b = tmp;
  }
  ll r;
  r = b % a;
  if (r == 0)
    return a;
  else
    return gcd(r, a);
}
//?????§??¬?´???°

ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
//????°???¬?????°

int main() {

  int n, a[105];

  cin >> n;
  for (int i = 0; i < n; i++) {

    cin >> a[i];
  }
  for (int i = n - 1; i >= 1; i--) {

    cout << a[i] << " ";
  }
  cout << a[0] << endl;

  return 0;
}


#include <iostream>
#include <vector>
using namespace std;

int main(void) {

  int n;
  cin >> n;

  vector<int> v;

  for (int unsigned i = 0; i < v.size(); i++) {
    cin >> v[i];
  }

  cout << v[n - 1];
  for (int unsigned i = 1; i < v.size(); i++) {
    cout << " " << v[n - i - 1];
  }
  cout << endl;
  // system("pause");
  return 0;
}

#include <iostream>
#include <vector>
using namespace std;

int main(void) {

  int n;
  cin >> n;

  vector<int> v(n);

  for (int unsigned i = 0; i < v.size(); i++) {
    cin >> v[i];
  }

  for (int unsigned i = 0; i < v.size(); i++) {
    cout << v[n - i - 1];
    if (i == n - 1) {
      cout << endl;
    } else {
      cout << " ";
    }
  }

  // system("pause");
  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  int a[100];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = n; 1 <= i; i++) {
    if (i)
      cout << " ";
    cout << a[i];
  }
  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int n, a;
  cin >> n;
  int ns[n];
  for (int i = 0; i < n; ++i) {
    cin >> a;
    ns[i] = a;
  }
  for (int j = 0; j < n; ++j) {
    if (j > 0)
      cout << " ";
    cout << ns[n - j - 1];
  }
  cout << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#define _USE_MATH_DEFINES
#include <functional>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;

int n;
vector<int> v;
int main() {
  cin >> n;

  for (int i = 0; i < n; ++i) {
    int buf;
    cin >> buf;
    v.push_back(buf);
  }

  // sort(v.begin(), v.end(), greater<int>());

  vector<int>::reverse_iterator it, end;
  for (it = v.rbegin(), end = v.rend(); it != end; --it) {
    cout << (*it) << " ";
  }
  cout << endl;

  return 0;
}

#include <algorithm>
#include <iostream>
#define _USE_MATH_DEFINES
#include <functional>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;

int n;
vector<int> v;
int main() {
  cin >> n;

  for (int i = 0; i < n; ++i) {
    int buf;
    cin >> buf;
    v.push_back(buf);
  }

  // sort(v.begin(), v.end(), greater<int>());

  vector<int>::reverse_iterator it, end;
  for (it = v.rbegin(), end = v.rend(); it != end; ++it) {
    if (it == v.rbegin())
      cout << (*it);
    else
      cout << " " << (*it);
  }
  cout << endl;

  return 0;
}


#include <stdio.h>

int main(void) {
  int n;
  scanf("%d", n);

  int a[100];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }

  for (int i = 0; i < n; i++) {
    printf("%d ", a[n - 1 - i]);
    if (i != n - 1) {
      printf(" ");
    }
  }

  return 0;
}

#include <stdio.h>

int main(void) {
  int n;
  scanf("%d", &n);

  int a[100];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }

  for (int i = 0; i < n; i++) {
    printf("%d", a[n - 1 - i]);
    if (i != n - 1) {
      printf(" ");
    }
  }

  printf("\\n");

  return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {
  int n;
  vector<int> p(n, 0);
  for (int i = 0; i < n; ++i)
    cin >> p[i];
  for (int i = n - 1; i > 0; --i)
    cout << p[i] << " ";
  cout << p[0] << endl;
}

#include <bits/stdc++.h>

using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i)
    cin >> v[i];
  for (int i = n - 1; i >= 0; --i) {
    if (i != n - 1)
      cout << " ";
    cout << v[i];
  }
  cout << endl;

  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;
#define MAX 100

int main(void) {
  int n, a[MAX], i = 0;
  do {
    cin >> n;
  } while (n > MAX || n < 0);

  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }

  while (1) {
    printf("%d", a[n - i]);
    if (i == n)
      break;
    printf(" ");
  }
  printf("\\n");
  return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;
#define MAX 100

int main(void) {
  int n, a[MAX], i = 0;
  do {
    cin >> n;
  } while (n > MAX || n < 0);

  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }

  while (1) {
    printf("%d", a[n - i - 1]);
    if (i++ == n - 1)
      break;
    printf(" ");
  }
  printf("\\n");
  return 0;
}


#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
  int n;
  cin >> n;
  int a[100];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == n - 1) {
      cout << a[i];
      for (i = n - 2; i >= 0; i--) {
        cout << " " << a[i];
      }
    }
  }
  return 0;
}

#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
  int n;
  cin >> n;
  int a[100];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == n - 1) {
      cout << a[i];
      for (i = n - 2; i >= 0; i--) {
        cout << " " << a[i];
      }
      cout << endl;
      break;
    }
  }
  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int n, a[100];
  cin >> n;

  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }

  for (int i = n - 1; n >= 0; i--) {
    if (i != n - 1)
      cout << " ";
    cout << a[i];
  }
  cout << endl;

  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int n, a[100];
  cin >> n;

  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }

  for (int i = n - 1; i >= 0; i--) {
    cout << a[i];
    if (i != 0)
      cout << ' ';
  }
  cout << endl;

  return 0;
}


#include <algorithm>
#include <iostream>
using namespace std;

int main() {
  int n, a[100];
  cin >> n;
  for (int i = 1; i <= n; i++)
    cin >> a[i];
  if (n % 2 == 0) {
    for (int i = 1; i <= n / 2; i++)
      std::swap(a[i], a[n - i]);
  } else {
    for (int i = 1; i <= (n - 1) / 2; i++)
      std::swap(a[i], a[n - i]);
  }
  for (int i = 1; 1 <= n; i++)
    std::cout << a[i] << " ";
  cout << endl;
}

#include <iostream>
#include <utility>
using namespace std;

int main() {
  int n, a[100];
  cin >> n;
  for (int i = 1; i <= n; i++)
    cin >> a[i];
  if (n % 2 == 0) {
    for (int j = 1; j <= n / 2; j++)
      std::swap(a[j], a[n - j + 1]);
  } else {
    for (int j = 1; j <= (n - 1) / 2; j++)
      std::swap(a[j], a[n - j + 1]);
  }
  for (int k = 1; k < n; k++)
    std::cout << a[k] << " ";
  cout << a[n] << endl;
}


#include <cassert>
#include <iostream>
// #define NDEBUG

int main(void) {
  using namespace std;
  static const int INPUT_N_MAX = 100; /* 前提条件 */
  static const int INPUT_A_MIN = 0;
  static const int INPUT_A_MAX = 1000;

  int input_n = 0;                               /* 数列の長さ */
  cin >> input_n;                                /* 入力の整数n */
  assert(0 < input_n && input_n <= INPUT_N_MAX); /* 前提条件 */
  int a[input_n];

  /* 入力 a[0]から順に格納 */
  for (int i = 0; i <= input_n; i++) {
    cin >> a[i];
    assert(INPUT_A_MIN <= a[i] && a[i] < INPUT_A_MAX); /* 前提条件 */
  }
  /* 出力 a[input_n-1]から降順に出力 */
  cout << a[input_n - 1];
  for (int i = input_n - 2; i >= 0; i--) {
    cout << " " << a[i];
  }
  cout << endl;
  return 0;
}

#include <cassert>
#include <iostream>
// #define NDEBUG

int main(void) {
  using namespace std;
  static const int INPUT_N_MAX = 100; /* 前提条件 */
  static const int INPUT_A_MIN = 0;
  static const int INPUT_A_MAX = 1000;

  int input_n = 0;                               /* 数列の長さ */
  cin >> input_n;                                /* 入力の整数n */
  assert(0 < input_n && input_n <= INPUT_N_MAX); /* 前提条件 */
  int a[input_n - 1];

  /* 入力 a[0]から順に格納 */
  for (int i = 0; i < input_n; i++) {
    cin >> a[i];
    assert(INPUT_A_MIN <= a[i] && a[i] < INPUT_A_MAX); /* 前提条件 */
  }
  /* 出力 a[input_n-1]から降順に出力 */
  cout << a[input_n - 1];
  for (int i = input_n - 2; i >= 0; i--) {
    cout << " " << a[i];
  }
  cout << endl;
  return 0;
}

28a5416a-2578-4e9f-8043-6b6c7a8b61d6.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02407/C++/s043895631.cpp:19: int main(): Assertion `INPUT_A_MIN <= a[i] && a[i] < INPUT_A_MAX' failed.


#include <iostream>

using namespace std;

int main() {
  int h;
  int in;
  int *a;
  int i;
  while (cin >> h) {
    for (i = 0; i < h; i++) {
      cin >> in;
      *(a + i) = in;
    }
    *(a + i) = '\\0';
    for (i = h - 1; i >= 0; i--) {
      cout << a[i] << " ";
    }
  }
}

#include <iostream>

using namespace std;

int main() {
  int h;
  int in;
  int a[100];
  int i;
  while (cin >> h) {
    for (i = 0; i < h; i++) {
      cin >> in;
      *(a + i) = in;
    }
    *(a + i) = '\\0';
    for (i = h - 1; i > 0; i--) {
      cout << a[i] << " ";
    }
    cout << a[0] << endl;
  }
}


#include <stdio.h>

int main() {

  int n = 0;
  scanf("%d", &n);
  int a[n + 1];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = n - 1; i = 1; i--) {
    printf("%d ", a[i]);
  }
  printf("%d\\n", a[0]);
  return 0;
}

#include <stdio.h>

int main() {

  int n = 0;
  scanf("%d", &n);
  int a[n + 1];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = n - 1; i >= 1; i--) {
    printf("%d ", a[i]);
  }
  printf("%d\\n", a[0]);
  return 0;
}


#include <stdio.h>

int main(void) {
  int i, n;
  scanf("%d", &n);
  int a[n];
  for (i = 0; i < n; ++i)
    scanf("%d", a[i]);
  for (i = n - 1; i >= 0; --i) {
    if (i)
      printf("%d ", a[i]);
    else
      printf("%d\\n", a[i]);
  }
  return 0;
}

#include <stdio.h>

int main(void) {
  int i, n;
  scanf("%d", &n);
  int a[n];
  for (i = 0; i < n; ++i)
    scanf("%d", &a[i]);
  for (i = n - 1; i >= 0; --i) {
    if (i)
      printf("%d ", a[i]);
    else
      printf("%d\\n", a[i]);
  }
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

int n;
int a[1000];
int b = 0;
int c = 0;

int main() {
  cin >> n;
  for (; b < n;) {
    cin >> a[b];
    ++b;
  }
  sort(a + b, a);
  for (; c < n;) {
    cout << a[c];
    ++c;
    if (c < n) {
      cout << " ";
    }
  }
  cout << endl;
}

#include <bits/stdc++.h>
using namespace std;

int n;
int a[1000];
int b = 0;

int main() {
  cin >> n;
  for (; b < n;) {
    cin >> a[b];
    ++b;
  }
  int c = n - 1;
  for (; 0 <= c;) {
    cout << a[c];
    if (0 < c) {
      cout << " ";
    }
    --c;
  }
  cout << endl;
}


#include <iostream>
int main() {
  int n, i, *A;
  std::cin >> n;
  A = new int[n];
  for (i = n - 1; i >= 0; i++)
    std::cin >> A[i];
  for (i = 0; i < n; i++)
    std::cout << A[i] << (n % i == 1 ? "\\n" : " ");
  return 0;
}

#include <iostream>
int main() {
  int n, i, *A;
  std::cin >> n;
  A = new int[n];
  for (i = n - 1; i >= 0; i--)
    std::cin >> A[i];
  for (i = 0; i < n; i++)
    std::cout << A[i] << (n - 1 == i ? "\\n" : " ");
  return 0;
}


#include <stdio.h>
#include <vector>
int n;
std::vector<int> data;
void proc() {
  auto begin = data.rbegin();
  for (auto it = data.rend(); it != begin;) {
    printf("%d", *it);
    if (++it != begin)
      printf(" ");
  }
  printf("\\n");
}

void input() {
  int x;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    data.push_back(x);
  }
}

int main() {
  input();
  proc();
}

#include <stdio.h>
#include <vector>
int n;
std::vector<int> data;
void proc() {
  auto end = data.rend();
  for (auto it = data.rbegin(); it != end;) {
    printf("%d", *it);
    if (++it != end)
      printf(" ");
  }
  printf("\\n");
}

void input() {
  int x;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    data.push_back(x);
  }
}

int main() {
  input();
  proc();
}


#include <iostream>
using namespace std;
int main() {
  int n, a[n];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n % 2 == 0) {
    for (int i = 0; i < n / 2; i++) {
      swap(a[i], a[n - 1 - i]);
    }
  } else {
    for (int i = 0; i < (n - 1) / 2; i++) {
      swap(a[i], a[n - 1 - i]);
    }
  }
  for (int i = 0; i < n - 1; i++) {
    cout << a[i] << " ";
  }
  cout << a[n - 1] << endl;
  return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = n - 1; i > 0; i--) {
    printf("%d ", a[i]);
  }
  cout << a[0] << endl;
  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int n;

  bool l[4][13];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      l[i][j] = false;
    }
  }

  cin >> n;

  for (int i = 0; i < n; i++) {
    char mark;
    int number;
    cin >> mark >> number;
    switch (mark) {
    case 'S':
      l[0][number - 1] = true;
      break;
    case 'H':
      l[1][number - 1] = true;
      break;
    case 'C':
      l[2][number - 1] = true;
      break;
    case 'D':
      l[3][number - 1] = true;
      break;
    }
  }

  // 0:S
  for (int j = 0; j < 13; j++) {
    if (l[0][j] == false) {
      cout << "S " << j + 1 << endl;
    }
  }

  // 1:H
  for (int j = 0; j < 13; j++) {
    if (l[1][j] == false) {
      cout << "H " << j + 1 << endl;
    }
  }

  // 2:C
  for (int j = 0; j < 13; j++) {
    if (l[2][j] == false) {
      cout << "C " << j + 1 << endl;
    }
  }

  // 3:D
  for (int j = 0; j < 13; j++) {
    if (l[3][j] == false) {
      cout << "D " << j + 1 << endl;
    }
  }

  return (0);
}


#include <iostream>
using namespace std;

int main() {
  bool card[4][13];
  char a;
  int n = 0, b = 0, f = 0;

  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a == 'S')
      f = 1;
    if (a == 'H')
      f = 2;
    if (a == 'C')
      f = 3;
    if (a == 'D')
      f = 4;

    cin >> b;

    card[f][b] = 1;
  }

  for (int j = 1; j <= 4; j++) {
    for (int k = 1; k <= 13; k++) {
      if (card[j][k] != 1) {
        if (j == 1)
          cout << "S " << k << endl;
        if (j == 2)
          cout << "H " << k << endl;
        if (j == 3)
          cout << "C " << k << endl;
        if (j == 4)
          cout << "D " << k << endl;
      }
    }
  }
}


#include "bits/stdc++.h"

using namespace std;

int main() {

  int kazu;
  bool n[4][14] = {false};
  int k[52];
  string p[52];
  cin >> kazu;
  for (int i = 1; i <= kazu; i++) {
    cin >> p[i - 1] >> k[i - 1];
    if (p[i - 1] == "S") {
      n[0][k[i - 1]] = 1;
    } else if (p[i - 1] == "H") {
      n[1][k[i - 1]] = 1;
    } else if (p[i - 1] == "C") {
      n[2][k[i - 1]] = 1;
    } else {
      n[3][k[i - 1]] = 1;
    }
  }
  for (int j = 0; j <= 3; j++) {
    for (int y = 1; y <= 13; y++) {
      if (n[j][y] == 0) {
        switch (j) {
        case 0:
          cout << "S " << y << endl;
          break;
        case 1:
          cout << "H " << y << endl;
          break;
        case 2:
          cout << "C " << y << endl;
          break;
        case 3:
          cout << "D " << y << endl;
          break;
        }
      }
    }
  }

  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int n; // yomu card no kazu
  cin >> n;

  int i, j, k;
  char m;
  int r;
  char mark[4];
  mark[0] = 'S';
  mark[1] = 'H';
  mark[2] = 'C';
  mark[3] = 'D';

  int rank[13];
  for (i = 0; i < 13; i++) {
    rank[i] = i + 1;
  }
  int cnt[4][13] = {};

  for (k = 0; k < n; k++) {
    scanf("%s %d\\n", m, r);
    for (i = 0; i < 4; i++) {
      for (j = 0; i < 13; j++) {
        if (mark[i] == m && rank[j] == r) {
          cnt[i][j] = 1;
        }
      }
    }
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++) {
      if (cnt[i][j] == 0)
        cout << mark[i] << rank[j] << endl;
    }
  }

  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int n; // yomu card no kazu

  int i, j, k;
  char m;
  int r;
  char mark[4];
  mark[0] = 'S';
  mark[1] = 'H';
  mark[2] = 'C';
  mark[3] = 'D';

  int rank[13];
  for (i = 0; i < 13; i++) {
    rank[i] = i + 1;
  }
  int cnt[4][13] = {};

  cin >> n;
  for (k = 0; k < n; k++) {
    cin >> m >> r;
    for (i = 0; i < 4; i++) {
      if (mark[i] == m)
        cnt[i][r - 1] = 1;
    }
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++) {
      if (cnt[i][j] == 0)
        cout << mark[i] << " " << rank[j] <\\
< endl;
    }
  }

  return 0;
}


#include <iostream>
#include <queue>
using namespace std;

int main() {
  int n, cnt = 1, N;
  int nS = 13, nH = 13, nC = 13, nD = 13;
  int numS, numH, numC, numD;
  char M;
  queue<int> S;
  queue<int> H;
  queue<int> C;
  queue<int> D;
  for (int i = 0; i < 13; i++) {
    S.push(cnt);
    H.push(cnt);
    C.push(cnt);
    D.push(cnt);
    cnt++;
  }
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> M >> N;
    if (M == 'S') {
      for (int j = 1; j <= 13; j++) {
        int huga = S.front();
        S.pop();
        if (huga != N) {
          S.push(j);
        }
        if (huga == N) {
          nS--;
          break;
        }
      }
    }
    if (M == 'H') {
      for (int j = 1; j <= 13; j++) {
        int huga = H.front();
        H.pop();
        if (huga != N) {
          H.push(j);
        }
        if (huga == N) {
          nH--;
          break;
        }
      }
    }
    if (M == 'C') {
      for (int j = 1; j <= 13; j++) {
        int huga = C.front();
        C.pop();
        if (huga != N) {
          C.push(j);
        }
        if (huga == N) {
          nC--;
          break;
        }
      }
    }
    if (M == 'D') {
      for (int j = 1; j <= 13; j++) {
        int huga = D.front();
        D.pop();
        if (huga != N) {
          D.push(j);
        }
        if (huga == N) {
          nD--;
          break;
        }
      }
    }
    for (int j = 0; j < nS; j++) {
      numS = S.front();
      cout << "S"
           << " " << numS << endl;
      S.pop();
    }
    for (int j = 0; j < nH; j++) {
      numH = H.front();
      cout << "H"
           << " " << numH << endl;
      H.pop();
    }
    for (int j = 0; j < nC; j++) {
      numC = C.front();
      cout << "C"
           << " " << numC << endl;
      C.pop();
    }
    for (int j = 0; j < nD; j++) {
      numD = D.front();
      cout << "D"
           << " " << numD << endl;
      D.pop();
    }
  }
  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int n, num, card[5][14];
  char m;
  for (int M = 0; M < 4; M++) {
    for (int N = 1; N <= 13; N++) {
      card[M][N] = 0;
    }
  }
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> m >> num;
    switch (m) {
    case 'S':
      card[0][num] = 1;
      break;
    case 'H':
      card[1][num] = 1;
      break;
    case 'C':
      card[2][num] = 1;
      break;
    case 'D':
      card[3][num] = 1;
      break;
    }
  }
  for (int M = 0; M < 4; M++) {
    for (int N = 1; N <= 13; N++) {
      if (card[M][N] == 1)
        continue;
      if (M == 0)
        m = 'S';
      if (M == 1)
        m = 'H';
      if (M == 2)
        m = 'C';
      if (M == 3)
        m = 'D';
      cout << m << " " << N << endl;
    }
  }

  return 0;
}


#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;

// TODO :
// ??????????????§?????£?????????????????????????????????AOJ?????¨??????????????????????????¨?????????????????§??????
int main(int argc, char *argv[]) {
  map<char, vector<int>> cards;
  vector<char> marks = {'S', 'H', 'C', 'D'};
  for (char c : marks) {
    vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
    cards.insert(make_pair(c, v));
  }

  int input_num = 0;
  cin >> input_num;

  char m;
  int n;
  for (int i = 0; i < input_num; i++) {
    cin >> m >> n;
    cards[m - 1][n - 1] = 0;
  }

  for (char c : marks) {
    for (int i : cards[c]) {
      if (i != 0) {
        cout << c << " " << i << endl;
      }
    }
  }

  return 0;
}

#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;

int main(int argc, char *argv[]) {
  map<char, vector<int>> cards;
  vector<char> marks = {'S', 'H', 'C', 'D'};
  for (char c : marks) {
    vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
    cards.insert(make_pair(c, v));
  }

  int input_num = 0;
  cin >> input_num;

  char m;
  int n;
  for (int i = 0; i < input_num; i++) {
    cin >> m >> n;
    cards[m][n - 1] = 0;
  }

  for (char c : marks) {
    for (int i : cards[c]) {
      if (i != 0) {
        cout << c << " " << i << endl;
      }
    }
  }

  return 0;
}


#include <iostream>
#include <string.h>
using namespace std;

int suit_str_to_int(char s[1]) {
  int suit;
  if (s[0] == 'S') {
    suit = 0;
  } else if (s[0] == 'H') {
    suit = 1;
  } else if (s[0] == 'C') {
    suit = 2;
  } else if (s[0] == 'D') {
    suit = 3;
  } else {
    cout << "You got an unexpected character.";
  }
  return suit;
}

char suit_int_to_str(int i) {
  char s[1];
  if (i == 0) {
    s[0] = {'S'};
  } else if (i == 1) {
    s[0] = {'H'};
  } else if (i == 2) {
    s[0] = {'C'};
  } else if (i == 3) {
    s[0] = {'D'};
  } else {
    cout << "You got an unexpected number";
  }
  return s[0];
}

int main() {
  int input_cards[4][13] = {0}, l, n, suit;
  char str[0];

  cin >> l;
  for (int i = 0; i < l; ++i) {
    cin >> str[0] >> n;
    suit = suit_str_to_int(str);
    input_cards[suit][n] = 1;
  }
  for (int j = 0; j < 4; ++j) {
    for (int k = 1; k < 14; ++k) {
      if (input_cards[j][k] == 1) {
        continue;
      } else {
        cout << suit_int_to_str(j) << " " << k << endl;
      }
    }
  }
  return 0;
}

#include <iostream>
using namespace std;

int suit_str_to_int(char s[1]) {
  int suit;
  if (s[0] == 'S') {
    suit = 0;
  } else if (s[0] == 'H') {
    suit = 1;
  } else if (s[0] == 'C') {
    suit = 2;
  } else if (s[0] == 'D') {
    suit = 3;
  } else {
    cout << "You got an unexpected character.";
  }
  return suit;
}

char suit_int_to_str(int i) {
  char s[1];
  if (i == 0) {
    s[0] = {'S'};
  } else if (i == 1) {
    s[0] = {'H'};
  } else if (i == 2) {
    s[0] = {'C'};
  } else if (i == 3) {
    s[0] = {'D'};
  } else {
    cout << "You got an unexpected number";
  }
  return s[0];
}

int main() {
  int input_cards[5][14] = {0}, l, n, suit;
  char str[0];

  cin >> l;
  for (int i = 0; i < l; ++i) {
    cin >> str[0] >> n;
    suit = suit_str_to_int(str);
    input_cards[suit][n] = 1;
  }
  for (int j = 0; j < 4; ++j) {
    for (int k = 1; k < 14; ++k) {
      if (input_cards[j][k] == 1) {
        continue;
      } else {
        cout << suit_int_to_str(j) << " " << k << endl;
      }
    }
  }
  return 0;
}


#include <stdio.h>

int main(void) {
  int n, i, j, ch;
  int card[4][13];
  char zu[10];
  int nu;

  for (i = 0; i < 4; i++) {
    for (j = 0; i < 13; j++)
      card[i][j] = 0;
  }

  scanf("%d", &n);

  for (i = 0; i < n; i++) {
    scanf("%s%d", zu, &nu);
    if (zu == "S")
      ch = 0;
    else if (zu == "H")
      ch = 1;
    else if (zu == "C")
      ch = 2;
    else
      ch = 3;
    card[ch][nu] = 1;
  }
  i = 0;

  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++) {
      if (card[i][j] == 0) {
        if (i == 0)
          printf("S %d\\n", j);
        else if (i == 1)
          printf("H %d\\n", j);
        else if (i == 2)
          printf("C %d\\n", j);
        else
          printf("D %d\\n", j);
      }
    }
  }

  return (0);
}

#include <stdio.h>

int main(void) {
  int n, i, j, ch;
  int card[4][13];
  char zu;
  int nu;

  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++)
      card[i][j] = 0;
  }

  scanf("%d", &n);

  for (i = 0; i < n; i++) {
    scanf("%s%d", &zu, &nu);
    if (zu == 'S')
      ch = 0;
    else if (zu == 'H')
      ch = 1;
    else if (zu == 'C')
      ch = 2;
    else
      ch = 3;
    card[ch][nu - 1] = 1;
  }

  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++) {
      if (card[i][j] == 0) {
        if (i == 0)
          printf("S %d\\n", j + 1);
        else if (i == 1)
          printf("H %d\\n", j + 1);
        else if (i == 2)
          printf("C %d\\n", j + 1);
        else
          printf("D %d\\n", j + 1);
      }
    }
  }
  return (0);
}


#include <stdio.h>
#pragma warning(disable : 4996)

int main(void) {

  int n, x, z;
  char s, y;
  int card[4][13] = {0};

  scanf("%d", &n);

  for (int i = 0; i < n; i++) {
    scanf("%d", &y);
    scanf("%d", &x);

    switch (x) {
    case 'S':
      z = 0;
      break;
    case 'H':
      z = 1;
      break;
    case 'C':
      z = 2;
      break;
    case 'D':
      z = 3;
      break;
    }

    card[z][x - 1] = 1;
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (card[i][j] == '\\0') {
        switch (i) {
        case 0:
          s = 'S';
          break;
        case 1:
          s = 'H';
          break;
        case 2:
          s = 'C';
          break;
        case 3:
          s = 'D';
          break;
        }
        printf("%c %d\\n", s, j + 1);
      }
    }
  }
  return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;
#pragma warning(disable : 4996)

int main(void) {

  int n, x, z;
  char s, y;
  int card[4][13] = {0};

  scanf("%d", &n);

  for (int i = 0; i < n; i++) {
    cin >> y >> x;

    switch (y) {
    case 'S':
      z = 0;
      break;
    case 'H':
      z = 1;
      break;
    case 'C':
      z = 2;
      break;
    case 'D':
      z = 3;
      break;
    }

    card[z][x - 1] = 1;
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (card[i][j] == '\\0') {
        switch (i) {
        case 0:
          s = 'S';
          break;
        case 1:
          s = 'H';
          break;
        case 2:
          s = 'C';
          break;
        case 3:
          s = 'D';
          break;
        }
        printf("%c %d\\n", s, j + 1);
      }
    }
  }
  return 0;
}


#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
#define FORR(i, a, b) for (int i = a; i >= b; --i)
#define pi M_PI

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;

int main() {
  int a[4][14] = {};
  int n;
  cin >> n;
  REP(i, n) {
    char c, x;
    cin >> c >> x;
    if (c == 'S')
      a[0][x] = 1;
    else if (c == 'H')
      a[1][x] = 1;
    else if (c == 'C')
      a[2][x] = 1;
    else
      a[3][x] = 1;
  }
  string s = "SHCD";
  REP(i, 4) FOR(j, 1, 13) if (a[i][j]) cout << s[i] << " " << j << endl;
  return 0;
}

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
#define FORR(i, a, b) for (int i = a; i >= b; --i)
#define pi M_PI

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;

int main() {
  int a[4][14] = {};
  int n;
  cin >> n;
  REP(i, n) {
    char c;
    int x;
    cin >> c >> x;
    if (c == 'S')
      a[0][x] = 1;
    else if (c == 'H')
      a[1][x] = 1;
    else if (c == 'C')
      a[2][x] = 1;
    else
      a[3][x] = 1;
  }
  string s = "SHCD";
  REP(i, 4) FOR(j, 1, 13) if (!a[i][j]) cout << s[i] << " " << j << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
int n;
std::vector<std::pair<std::string, int>> cards;

void regcards(std::string str, int x) {
  cards.push_back(std::make_pair(str, x));
}
int main() {
  for (int i = 0; i < 4; ++i) {
    for (int j = 1; j <= 13; ++j) {
      switch (i) {
      case 0:
        regcards("S", j);
        break;
      case 1:
        regcards("H", j);
        break;
      case 2:
        regcards("C", j);
        break;
      case 3:
        regcards("D", j);
        break;
      }
    }
  }
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    std::string str;
    int x;
    std::cin >> str >> x;
    for (auto it = cards.begin(); it != cards.end(); ++it) {
      if (*it == std::make_pair(str, x))
        cards.erase(it);
    }
  }
  if (cards.empty()) {
    std::cout << std::endl;
    return 0;
  }
  for (auto v : cards) {
    std::cout << v.first << " " << v.second << std::endl;
  }
  return 0;
}

#include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
int n;
std::vector<std::pair<std::string, int>> cards;

void regcards(std::string str, int x) {
  cards.push_back(std::make_pair(str, x));
}
int main() {
  for (int i = 0; i < 4; ++i) {
    for (int j = 1; j <= 13; ++j) {
      switch (i) {
      case 0:
        regcards("S", j);
        break;
      case 1:
        regcards("H", j);
        break;
      case 2:
        regcards("C", j);
        break;
      case 3:
        regcards("D", j);
        break;
      }
    }
  }
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    std::string str;
    int x;
    std::cin >> str >> x;
    for (auto it = cards.begin(); it < cards.end(); ++it) {
      if (*it == std::make_pair(str, x))
        cards.erase(it);
    }
  }
  if (cards.empty()) {
    return 0;
  }
  for (auto v : cards) {
    std::cout << v.first << " " << v.second << std::endl;
  }
  return 0;
}


#include <iostream>
using namespace std;

int main() {
  bool cards[4][13];
  int n, rank;
  char suit;

  for (int s = 0; s < 4; s++)
    for (int r = 1; r <= 13; r++)
      cards[s][r] = 0; //??¨??¨???????´????false??????

  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> suit >> rank;
    if (suit == 'S')
      cards[0][rank] = 1;
    if (suit == 'H')
      cards[1][rank] = 1;
    if (suit == 'C')
      cards[2][rank] = 1;
    if (suit == 'D')
      cards[3][rank] = 1;
  }

  for (int s = 0; s < 4; s++) {
    for (int r = 1; r <= 13; r++) {
      if (cards[s][r])
        continue;
      if (s == 0)
        suit = 'S';
      if (s == 1)
        suit = 'H';
      if (s == 2)
        suit = 'C';
      if (s == 3)
        suit = 'D';
      cout << suit << " " << r << endl;
    }
  }

  return 0;
}

#include <iostream>
using namespace std;

int main() {
  bool cards[4][14];
  int n, rank;
  char suit;

  for (int s = 0; s < 4; s++)
    for (int r = 1; r <= 13; r++)
      cards[s][r] = 0; //??¨??¨???????´????false??????

  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> suit >> rank;
    if (suit == 'S')
      cards[0][rank] = 1;
    if (suit == 'H')
      cards[1][rank] = 1;
    if (suit == 'C')
      cards[2][rank] = 1;
    if (suit == 'D')
      cards[3][rank] = 1;
  }

  for (int s = 0; s < 4; s++) {
    for (int r = 1; r <= 13; r++) {
      if (cards[s][r])
        continue;
      if (s == 0)
        suit = 'S';
      if (s == 1)
        suit = 'H';
      if (s == 2)
        suit = 'C';
      if (s == 3)
        suit = 'D';
      cout << suit << " " << r << endl;
    }
  }

  return 0;
}


#include <stdio.h>
#include <vector>

int main() {
  bool poss[4][14];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      poss[i][j] = false;
    }
  }

  int n;
  scanf("%d", &n);

  for (int i = 0; i < n; i++) {
    char mark;
    int num;
    scanf(" %c &d", &mark, &num);
    switch (mark) {
    case 'S':
      poss[0][num] = true;
      break;
    case 'H':
      poss[1][num] = true;
      break;
    case 'C':
      poss[2][num] = true;
      break;
    case 'D':
      poss[3][num] = true;
      break;
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (!poss[0][i]) {
      printf("S %d\\n", i);
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (!poss[1][i]) {
      printf("H %d\\n", i);
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (!poss[2][i]) {
      printf("C %d\\n", i);
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (!poss[3][i]) {
      printf("D %d\\n", i);
    }
  }
  return 0;
}

#include <stdio.h>
#include <vector>

int main() {
  bool poss[4][14];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 14; j++) {
      poss[i][j] = false;
    }
  }

  int n;
  scanf("%d", &n);

  for (int i = 0; i < n; i++) {
    char mark;
    int num;
    scanf(" %c %d", &mark, &num);
    switch (mark) {
    case 'S':
      poss[0][num] = true;
      break;
    case 'H':
      poss[1][num] = true;
      break;
    case 'C':
      poss[2][num] = true;
      break;
    case 'D':
      poss[3][num] = true;
      break;
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (!poss[0][i]) {
      printf("S %d\\n", i);
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (!poss[1][i]) {
      printf("H %d\\n", i);
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (!poss[2][i]) {
      printf("C %d\\n", i);
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (!poss[3][i]) {
      printf("D %d\\n", i);
    }
  }
  return 0;
}


#include <iostream>
using namespace std;

int changeNum(char c) {
  switch (c) {
  case 'S':
    return 0;
  case 'H':
    return 1;
  case 'C':
    return 2;
  case 'D':
    return 3;
  }
}

int main(void) {
  int n, suit, num;
  bool card[4][13];
  cin >> n;

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      card[i][j] = false;
    }
  }

  char c;
  for (int i = 0; i < n; i++) {
    cin >> c >> num;
    card[changeNum(c)][num - 1] = true;
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (!card[i][j]) {
        switch (i) {
        case 0:
          cout << "S " << j + 1;
          break;
        case 1:
          cout << "H " << j + 1;
          break;
        case 2:
          cout << "C " << j + 1;
          break;
        case 3:
          cout << "D " << j + 1;
        }
        cout << endl;
      }
    }
  }

  return 1;
}

#include <iostream>
using namespace std;

int changeNum(char c) {
  switch (c) {
  case 'S':
    return 0;
  case 'H':
    return 1;
  case 'C':
    return 2;
  case 'D':
    return 3;
  }
}

int main(void) {
  int n, suit, num;
  bool card[4][13];
  cin >> n;

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      card[i][j] = false;
    }
  }

  char c;
  for (int i = 0; i < n; i++) {
    cin >> c >> num;
    card[changeNum(c)][num - 1] = true;
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (!card[i][j]) {
        switch (i) {
        case 0:
          cout << "S " << j + 1;
          break;
        case 1:
          cout << "H " << j + 1;
          break;
        case 2:
          cout << "C " << j + 1;
          break;
        case 3:
          cout << "D " << j + 1;
        }
        cout << endl;
      }
    }
  }

  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int cards[4][13], x, y, z, n, j, k, l;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x == 'S')
      z = 0;
    else if (x == 'H')
      z = 1;
    else if (x == 'C')
      z = 2;
    else
      z = 3;
    cards[z][y] = 1;
  }
  for (j = 0; j < 4; j++) {
    for (k = 0; k < 13; k++) {
      if (cards[j][k] == 0) {
        if (j == 0)
          l = 'S';
        else if (j == 1)
          l = 'H';
        else if (j == 2)
          l = 'C';
        else
          l = 'D';
        cout << l << " " << k + 1 << endl;
      }
    }
  }
}


#include <algorithm>
#include <cmath>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <vector>

using namespace std;

int suitToIndex(char c) {
  switch (c) {
  default:
  case 'S':
    return 0;
  case 'H':
    return 1;
  case 'C':
    return 2;
  case 'D':
    return 3;
  }
}

char suits[4] = {'S', 'H', 'C', 'D'};

int main() {
  bool found[4][13] = {};
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    char suit;
    int rank;
    cin >> suit >> rank;
    found[suitToIndex(suit)][rank] = true;
  }
  for (int suitIndex = 0; suitIndex < 4; ++suitIndex) {
    for (int rank = 1; rank <= 13; ++rank) {
      if (!found[suitIndex][rank]) {
        cout << suits[suitIndex] << " " << rank << endl;
        ;
      }
    }
  }
}

#include <algorithm>
#include <cmath>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <vector>

using namespace std;

int suitToIndex(char c) {
  switch (c) {
  default:
  case 'S':
    return 0;
  case 'H':
    return 1;
  case 'C':
    return 2;
  case 'D':
    return 3;
  }
}

char suits[4] = {'S', 'H', 'C', 'D'};

int main() {
  bool found[4][13] = {};
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    char suit;
    int rank;
    cin >> suit >> rank;
    found[suitToIndex(suit)][rank - 1] = true;
  }
  for (int suitIndex = 0; suitIndex < 4; ++suitIndex) {
    for (int rank = 1; rank <= 13; ++rank) {
      if (!found[suitIndex][rank - 1]) {
        cout << suits[suitIndex] << " " << rank << endl;
        ;
      }
    }
  }
}


#include <iostream>
#include <string>

using namespace std;

int main() {
  int n, num;
  int a[3][13];
  cin >> n;
  for (int i = 0; i < n; i++) {
    string SHCD;
    cin >> SHCD >> num;
    int x;
    if (SHCD == "S") {
      x = 0;
    } else if (SHCD == "H") {
      x = 1;
    } else if (SHCD == "C") {
      x = 2;
    } else if (SHCD == "D") {
      x = 3;
    }
    a[x][num] = 1;
  }
  for (int j = 0; j < 4; j++) {
    for (int k = 1; k < 14; k++) {
      if (a[j][k] != 1) {
        string SHCD;
        if (j == 0) {
          SHCD = "S";
        } else if (j == 1) {
          SHCD = "H";
        } else if (j == 2) {
          SHCD = "C";
        } else if (j == 3) {
          SHCD = "D";
        }
        cout << SHCD << " " << k << endl;
      }
    }
  }
}

#include <iostream>
#include <string>

using namespace std;

int main() {
  int n, num;
  int a[100][100] = {0};
  cin >> n;
  for (int i = 0; i < n; i++) {
    string SHCD;
    cin >> SHCD >> num;
    int x;
    if (SHCD == "S") {
      x = 0;
    } else if (SHCD == "H") {
      x = 1;
    } else if (SHCD == "C") {
      x = 2;
    } else if (SHCD == "D") {
      x = 3;
    }
    a[x][num] = 1;
  }
  for (int j = 0; j < 4; j++) {
    for (int k = 1; k < 14; k++) {
      if (!a[j][k]) {
        string shcd;
        if (j == 0) {
          shcd = "S";
        } else if (j == 1) {
          shcd = "H";
        } else if (j == 2) {
          shcd = "C";
        } else if (j == 3) {
          shcd = "D";
        }
        cout << shcd << " " << k << endl;
      }
    }
  }
}


#include <iostream>
#include <vector>
using namespace std;

int main() {
  vector<int> S(13, 0);
  vector<int> H(13, 0);
  vector<int> C(13, 0);
  vector<int> D(13, 0);
  int n;
  char c;
  int num;
  cin >> n;

  for (int i = 0; i < n; i++) {
    cin >> c >> num;
    switch (c) {
    case 'S':
      S[num - 1] = 1;
      break;
    case 'H':
      H[num - 1] = 1;
      break;
    case 'C':
      C[num - 1] = 1;
      break;
    case 'D':
      D[num - 1] = 1;
      break;
    }
  }

  for (int i = 0; i < 13; i++) {
    if (S[i] == 0)
      cout << "S" << i++ << endl;
    i--;
  }
  for (int i = 0; i < 13; i++) {
    if (H[i] == 0)
      cout << "H" << i++ << endl;
    i--;
  }
  for (int i = 0; i < 13; i++) {
    if (C[i] == 0)
      cout << "C" << i++ << endl;
    i--;
  }
  for (int i = 0; i < 13; i++) {
    if (D[i] == 0)
      cout << "D" << i++ << endl;
    i--;
  }
}

#include <iostream>
#include <vector>
using namespace std;

int main() {
  vector<int> S(13, 0);
  vector<int> H(13, 0);
  vector<int> C(13, 0);
  vector<int> D(13, 0);
  int n;
  char c;
  int num;
  cin >> n;

  for (int i = 0; i < n; i++) {
    cin >> c >> num;
    switch (c) {
    case 'S':
      S[num - 1] = 1;
      break;
    case 'H':
      H[num - 1] = 1;
      break;
    case 'C':
      C[num - 1] = 1;
      break;
    case 'D':
      D[num - 1] = 1;
      break;
    }
  }

  for (int i = 0; i < 13; i++) {
    if (S[i] == 0) {
      n = i + 1;
      cout << "S"
           << " " << n << endl;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (H[i] == 0) {
      n = i + 1;
      cout << "H"
           << " " << n << endl;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (C[i] == 0) {
      n = i + 1;
      cout << "C"
           << " " << n << endl;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (D[i] == 0) {
      n = i + 1;
      cout << "D"
           << " " << n << endl;
    }
  }
}


#include <iostream>
using namespace std;
int main(void) {

  // 変数宣言&初期化
  char spel; // 絵柄代入用
  int num[52], total = 0, i = 0, j = 0;
  bool card[4][13];

  cin >> total;

  // 入力
  for (i = 0; i < total; i++) {
    cin >> spel >> num[i];
  }

  //
  for (i = 0; i < total; i++) {
    if (spel == 'S') {
      card[0][num[i]] = true;
    }

    if (spel == 'H') {
      card[1][num[i]] = true;
    }

    if (spel == 'C') {
      card[2][num[i]] = true;
    }

    if (spel == 'D') {
      card[3][num[i]] = true;
    }
  }

  // 不足しているカードの特定
  for (j = 0; j < 4; j++) {

    for (i = 0; i < 14; i++) {

      if (card[j][i] == false && i != 0) {

        // 絵柄特定
        if (j == 0) {
          cout << "S " << i << endl;
        }

        if (j == 1) {
          cout << "H " << i << endl;
        }

        if (j == 2) {
          cout << "C " << i << endl;
        }

        if (j == 3) {
          cout << "D " << i << endl;
        }
      }
    }
  }

  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int n;
  char suits[4] = {'S', 'H', 'C', 'D'};
  bool d[4][13] = {false};

  cin >> n;

  while (1) {
    for (int i = 0; i < n; i++) {
      char mark;
      int A;

      cin >> mark >> A;

      if (mark == suits[0])
        d[0][A - 1] = true;
      else if (mark == suits[1])
        d[1][A - 1] = true;
      else if (mark == suits[2])
        d[2][A - 1] = true;
      else if (mark == suits[3])
        d[3][A - 1] = true;
    }

    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < 13; j++) {
        if (d[i][j] == false)
          cout << suits[i] << " " << j + 1 << "\\n";
      }
    }
  }

  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int n;
  char suits[4] = {'S', 'H', 'C', 'D'};
  bool d[4][13] = {false};

  cin >> n;

  for (int i = 0; i < n; i++) {
    char mark;
    int A;

    cin >> mark >> A;

    if (mark == suits[0])
      d[0][A - 1] = true;
    else if (mark == suits[1])
      d[1][A - 1] = true;
    else if (mark == suits[2])
      d[2][A - 1] = true;
    else if (mark == suits[3])
      d[3][A - 1] = true;
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (d[i][j] == false)
        cout << suits[i] << " " << j + 1 << "\\n";
    }
  }

  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  int cards[52] = {};
  char mark;
  int num;

  for (int i = 0; i < n; i++) {
    cin >> mark >> num;

    switch (mark) {
    case 'S':
      break;
    case 'H':
      num += 13;
      break;
    case 'C':
      num += 26;
      break;
    case 'D':
      num += 39;
      break;
    }
    cards[num] = num;
  }

  for (int i = 1; i <= 52; i++) {
    if (cards[i] == 0) {
      switch ((i - 1) / 13) {
      case 0:
        mark = 'S';
        break;
      case 1:
        mark = 'H';
        break;
      case 2:
        mark = 'C';
        break;
      case 3:
        mark = 'D';
        break;
      }
      cout << mark << " " << (i - ((i - 1) / 13) * 13) << endl;
    }
  }
  return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  bool cards[53] = {};
  char mark;
  int num;

  for (int i = 0; i < n; i++) {
    cin >> mark >> num;

    switch (mark) {
    case 'S':
      break;
    case 'H':
      num += 13;
      break;
    case 'C':
      num += 26;
      break;
    case 'D':
      num += 39;
      break;
    }
    cards[num] = num;
  }

  for (int i = 1; i <= 52; i++) {
    if (cards[i] == 0) {
      switch ((i - 1) / 13) {
      case 0:
        mark = 'S';
        break;
      case 1:
        mark = 'H';
        break;
      case 2:
        mark = 'C';
        break;
      case 3:
        mark = 'D';
        break;
      }
      cout << mark << " " << (i - ((i - 1) / 13) * 13) << endl;
    }
  }
  return 0;
}


#include <iostream>

int main() {
  int n, r;
  char m;
  std::cin >> n;
  bool a[4][13]{};
  for (int i = 0; i != n; ++n) {
    std::cin >> m >> r;
    switch (m) {
    case 'S':
      a[0][r - 1] = true;
      break;
    case 'H':
      a[1][r - 1] = true;
      break;
    case 'C':
      a[2][r - 1] = true;
      break;
    case 'D':
      a[3][r - 1] = true;
      break;
    }
  }
  for (int i = 0; i != 4; ++i) {
    for (int j = 0; j != 13; ++j) {
      switch (i) {
      case 0:
        if (a[i][j])
          std::cout << 'S' << ' ' << j + 1;
        break;
      case 1:
        if (a[i][j])
          std::cout << 'H' << ' ' << j + 1;
        break;
      case 2:
        if (a[i][j])
          std::cout << 'C' << ' ' << j + 1;
        break;
      case 3:
        if (a[i][j])
          std::cout << 'D' << ' ' << j + 1;
        break;
      }
      std::cout << '\\n';
    }
  }
}


#include <bits/stdc++.h>
using namespace std;

int main() {

  int n;

  cin >> n;

  int card[4][13] = {};

  for (int i = 0; i < n; i++) {

    string suit;

    int num;

    cin >> suit >> num;

    if (suit == "S")
      card[0][num - 1] = 1;
    if (suit == "H")
      card[0][num - 1] = 1;
    if (suit == "C")
      card[2][num - 1] = 1;
    if (suit == "D")
      card[3][num - 1] = 1;
  }

  string str[4] = {"S", "H", "C", "D"};
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      if (card[i][j] == 1)
        continue;
      cout << str[i] << " " << j + 1 << endl;
    }
  }

  return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {

  int n;

  cin >> n;

  int card[4][13] = {};

  for (int i = 0; i < n; i++) {

    string suit;

    int num;

    cin >> suit >> num;

    if (suit == "S")
      card[0][num - 1] = 1;
    if (suit == "H")
      card[1][num - 1] = 1;
    if (suit == "C")
      card[2][num - 1] = 1;
    if (suit == "D")
      card[3][num - 1] = 1;
  }

  string str[4] = {"S", "H", "C", "D"};
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (card[i][j] == 1)
        continue;
      cout << str[i] << " " << j + 1 << endl;
    }
  }

  return 0;
}


#include <stdio.h>

int main() {
  int cards[4][13], num, n, m, i, j;
  char mark;

  for (i = 0; i < 4; i++)
    for (j = 0; j < 13; j++)
      cards[i][j] = -1;

  scanf("%d", &n);

  for (i = 0; i < n * 2; i++) {
    scanf("%c", &mark);
    scanf("%d", &num);
    if (mark == 'S')
      cards[0][num - 1] = 0;
    else if (mark == 'H')
      cards[1][num - 1] = 0;
    else if (mark == 'C')
      cards[2][num - 1] = 0;
    else if (mark == 'D')
      cards[3][num - 1] = 0;
  }

  for (i = 0; i < 4; i++)
    for (j = 0; j < 13; j++) {
      if (cards[i][j] == -1) {
        if (i == 0)
          printf("S %d\\n", j + 1);
        else if (i == 1)
          printf("H %d\\n", j + 1);
        else if (i == 2)
          printf("C %d\\n", j + 1);
        else if (i == 3)
          printf("D %d\\n", j + 1);
      }
    }

  return 0;
}


#include <iostream>
#include <math.h>
using namespace std;

int main(void) {
  int n, b, cards[4][13] = {0};
  char a;

  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a >> b;
    switch (a) {
    case 'S':
      cards[0][b] = true;
    case 'H':
      cards[1][b] = true;
    case 'C':
      cards[2][b] = true;
    case 'D':
      cards[3][b] = true;
    }
  }

  for (int i = 0; i <= 3; i++) {
    for (int j = 1; j <= 13; j++) {
      if (cards[i][j] == false) {
        if (int i = 0)
          a = 'S';
        if (int i = 1)
          a = 'H';
        if (int i = 2)
          a = 'C';
        if (int i = 3)
          a = 'D';
        cout << a << " " << j << endl;
      } else
        continue;
    }
  }

  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int n, b;
  bool cards[4][14];
  char a;

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 15; j++) {
      cards[i][j] = false;
    }
  }

  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    if (a == 'S')
      cards[0][b] = true;
    if (a == 'H')
      cards[1][b] = true;
    if (a == 'C')
      cards[2][b] = true;
    if (a == 'D')
      cards[3][b] = true;
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 1; j <= 13; j++) {
      if (cards[i][j] == false) {
        if (i == 0)
          a = 'S';
        if (i == 1)
          a = 'H';
        if (i == 2)
          a = 'C';
        if (i == 3)
          a = 'D';
        cout << a << " " << j << endl;
      } else
        continue;
    }
  }

  return 0;
}


#include <iostream>

using namespace std;

int main() {

  int cards[4][13];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      cards[i][j] = 0;
    }
  }

  int n;
  cin >> n;
  char mark;
  int num;
  for (int i = 0; i < n; i++) {
    cin >> mark >> num;
    if (mark == 'S') {
      cards[0][num - 1] = 1;
    } else if (mark == 'H') {
      cards[1][num - 1] = 1;
    } else if (mark == 'C') {
      cards[2][num - 1] = 1;
    } else if (mark == 'D') {
      cards[3][num - 1] = 1;
    }
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (cards[i][j] == 0) {
        if (i == 0) {
          cout << 'S' << " ";
        } else if (i == 1) {
          cout << 'H' << " ";
        } else if (i == 2) {
          cout << 'C' << " ";
        } else if (i == 3) {
          cout << 'D' << " ";
        }
        cout << j + 1 << endl;
      }
    }
  }
  while (1)
    ;
}

#include <iostream>

using namespace std;

int main() {

  int cards[4][13];

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      cards[i][j] = 0;
    }
  }

  int n;
  cin >> n;
  char mark;
  int num;
  for (int i = 0; i < n; i++) {
    cin >> mark >> num;
    if (mark == 'S') {
      cards[0][num - 1] = 1;
    } else if (mark == 'H') {
      cards[1][num - 1] = 1;
    } else if (mark == 'C') {
      cards[2][num - 1] = 1;
    } else if (mark == 'D') {
      cards[3][num - 1] = 1;
    }
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (cards[i][j] == 0) {
        if (i == 0) {
          cout << 'S' << " ";
        } else if (i == 1) {
          cout << 'H' << " ";
        } else if (i == 2) {
          cout << 'C' << " ";
        } else if (i == 3) {
          cout << 'D' << " ";
        }
        cout << j + 1 << endl;
      }
    }
  }
}


#include <iostream>
using namespace std;

int main() {
  int card[51] = {0};
  int total, number;
  char type;
  cin >> total;
  for (int i = 0; i < total; i++) {
    cin >> type >> number;
    if (type == 'S') {
      card[number - 1] = {1};
    }
    if (type == 'H') {
      card[number + 12] = {1};
    }
    if (type == 'C') {
      card[number + 25] = {1};
    }
    if (type == 'D') {
      card[number + 38] = {1};
    }
  }
  for (int i = 0; i < 52; i++) {
    if (card[i] == 0) {
      if (i < 13) {
        cout << "S"
             << " " << i + 1 << endl;
      }
      if (i >= 13 && i < 26) {
        cout << "H"
             << " " << i - 12 << endl;
      }
      if (i >= 26 && i < 39) {
        cout << "C"
             << " " << i - 25 << endl;
      }
      if (i >= 39 && i < 52) {
        cout << "D"
             << " " << i - 38 << endl;
      }
    }
  }
}

#include <iostream>
using namespace std;

int main() {
  int card[52] = {0};
  int total, number;
  char type;
  cin >> total;
  for (int i = 0; i < total; i++) {
    cin >> type >> number;
    if (type == 'S') {
      card[number - 1] = {1};
    }
    if (type == 'H') {
      card[number + 12] = {1};
    }
    if (type == 'C') {
      card[number + 25] = {1};
    }
    if (type == 'D') {
      card[number + 38] = {1};
    }
  }
  for (int i = 0; i < 52; i++) {
    if (card[i] == 0) {
      if (i < 13) {
        cout << "S"
             << " " << i + 1 << endl;
      }
      if (i >= 13 && i < 26) {
        cout << "H"
             << " " << i - 12 << endl;
      }
      if (i >= 26 && i < 39) {
        cout << "C"
             << " " << i - 25 << endl;
      }
      if (i >= 39 && i < 52) {
        cout << "D"
             << " " << i - 38 << endl;
      }
    }
  }
}


#include <cstdio>
#include <iostream>
using namespace std;
#define MAX 52

int main(void) {
  bool cards[4][13], n, rank;
  char stamp;

  do {
    cin >> n;
  } while (n < 0 || n > MAX);

  int i = 0;

  while (1) {

    cin >> stamp >> rank;

    switch (stamp) {
    case 'S':
      cards[0][rank - 1] = true;
      break;
    case 'H':
      cards[1][rank - 1] = true;
      break;
    case 'C':
      cards[2][rank - 1] = true;
      break;
    case 'D':
      cards[3][rank - 1] = true;
      break;
    default:
      break;
    }
    if (i++ == rank - 1)
      break;
  }

  for (int i = 0; i < rank; i++) {
    for (int j = 0; j < 4; j++) {
      if (cards[j][i] == true) {
        switch (j) {
        case 0:
          printf("S ");
          break;
        case 1:
          printf("H ");
          break;
        case 2:
          printf("C ");
          break;
        case 3:
          printf("D ");
          break;
        default:
          break;
        }
        printf("%d\\n", i);
      }
    }
  }

  return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;
#define MAX 52

int main(void) {
  bool cards[4][13];
  int n, rank;
  char stamp;

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      cards[i][j] = false;
    }
  }

  do {
    cin >> n;
  } while (n < 0 || n > MAX);

  int i = 0;

  while (1) {

    cin >> stamp >> rank;

    switch (stamp) {
    case 'S':
      cards[0][rank - 1] = true;
      break;
    case 'H':
      cards[1][rank - 1] = true;
      break;
    case 'C':
      cards[2][rank - 1] = true;
      break;
    case 'D':
      cards[3][rank - 1] = true;
      break;
    default:
      break;
    }
    if (i++ == n - 1)
      break;
  }

  for (int j = 0; j < 4; j++) {
    for (int i = 0; i < 13; i++) {
      if (cards[j][i] == false) {
        switch (j) {
        case 0:
          printf("S ");
          break;
        case 1:
          printf("H ");
          break;
        case 2:
          printf("C ");
          break;
        case 3:
          printf("D ");
          break;
        default:
          break;
        }
        printf("%d\\n", i + 1);
      }
    }
  }

  return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int n = 0, no;
  char mark;
  int card[4][13];
  cin >> n;
  for (int i = n; n > i; i++) {
    cin >> mark;
    cin >> no;
    switch (mark) {
    case 'S':
      card[0][no] = 99;
      break;
    case 'H':
      card[1][no] = 99;
      break;
    case 'D':
      card[2][no] = 99;
      break;
    case 'C':
      card[3][no] = 99;
      break;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int n = 0; n < 13;) {
      if (card[i][n] != 99) {
        switch (i) {
        case 0:
          cout << "S " << n << endl;
          break;
        case 1:
          cout << "H " << n << endl;
          break;
        case 2:
          cout << "D " << n << endl;
          break;
        case 3:
          cout << "C " << n << endl;
          break;
        }
      }
    }
  }
  return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int n = 0, no;
  char mark;
  int card[4][15];
  cin >> n;
  for (int i = 0; n > i; i++) {
    cin >> mark;
    cin >> no;
    switch (mark) {
    case 'S':
      card[0][no] = 99;
      break;
    case 'H':
      card[1][no] = 99;
      break;
    case 'C':
      card[2][no] = 99;
      break;
    case 'D':
      card[3][no] = 99;
      break;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int n = 1; n <= 13; n++) {
      if (card[i][n] != 99) {
        switch (i) {
        case 0:
          cout << "S " << n << endl;
          break;
        case 1:
          cout << "H " << n << endl;
          break;
        case 2:
          cout << "C " << n << endl;
          break;
        case 3:
          cout << "D " << n << endl;
          break;
        }
      }
    }
  }
  return 0;
}


#include <iostream>
using namespace std;
int main() {
  int cards[3][12] = {0};
  int num, i, x, y;
  char ch;
  cin >> num;
  for (i = 0; i < num; i++) {
    cin >> ch >> y;
    if (ch == 'S')
      x = 0;
    else if (ch == 'H')
      x = 1;
    else if (ch == 'C')
      x = 2;
    else
      x = 3;
    cards[x][y - 1] = 1;
  }
  int j, k;
  for (j = 0; j < 4; j++) {
    for (k = 0; k < 13; k++) {
      if (cards[j][k] != 1) {
        if (j == 0)
          cout << "S " << k + 1 << endl;
        else if (j == 1)
          cout << "H " << k + 1 << endl;
        else if (j == 2)
          cout << "C " << k + 1 << endl;
        else
          cout << "D " << k + 1 << endl;
      }
    }
  }
  return 0;
}

#include <iostream>
using namespace std;
int main() {
  int cards[4][13] = {0};
  int num, i, x, y;
  char ch;
  cin >> num;
  for (i = 0; i < num; i++) {
    cin >> ch >> y;
    if (ch == 'S')
      x = 0;
    else if (ch == 'H')
      x = 1;
    else if (ch == 'C')
      x = 2;
    else
      x = 3;
    cards[x][y - 1] = 1;
  }
  int j, k;
  for (j = 0; j < 4; j++) {
    for (k = 0; k < 13; k++) {
      if (cards[j][k] != 1) {
        if (j == 0)
          cout << "S " << k + 1 << endl;
        else if (j == 1)
          cout << "H " << k + 1 << endl;
        else if (j == 2)
          cout << "C " << k + 1 << endl;
        else
          cout << "D " << k + 1 << endl;
      }
    }
  }
  return 0;
}


#include <cstring>
#include <iostream>
using namespace std;

int card[4][13] = {};

int main() {
  int n;
  char mark;
  int number;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> mark >> number;
    switch (mark) {
    case 'S':
      card[0][number - 1] = 1;
      break;
    case 'H':
      card[1][number - 1] = 1;
      break;
    case 'C':
      card[2][number - 1] = 1;
      break;
    case 'D':
      card[3][number - 1] = 1;
      break;
    }
  }
  //
  for (int i = 0; i < 13; i++) {
    if (card[0][i] != 1) {
      cout << "S " << i + 1 << endl;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (card[1][i] != 1) {
      cout << "H " << i + 1 << endl;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (card[2][i] != 1) {
      cout << "C " << i + 1 << endl;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (card[3][i] != 1) {
      cout << "D " << i + 1 << endl;
    }
  }
  return 0;
}


#include <stdio.h>

int main() {
  char number[1001];
  int i, sum;
  while (1) {
    scanf("%s", number);
    if (number[0] == '0')
      break;
    sum = 0;
    for (i = 0; number[i] != '\\0'; i++) {
      sum += number[i] - '0';
    }
    printf("%d\\n", sum);
  }

  return 0;
}

#include <stdbool.h>
#include <stdio.h>

int main() {
  int i, j, n;
  char mark;
  char marks[4] = {'S', 'H', 'C', 'D'};
  int num;
  bool cards[4][13] = {false};

  scanf("%d ", &n);
  for (i = 0; i < n; i++) {
    scanf("%c %d ", &mark, &num);
    for (j = 0; j < 4; j++) {
      if (mark == marks[j]) {
        cards[j][num - 1] = true;
        break;
      }
    }
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++) {
      if (!cards[i][j]) {
        printf("%c %d\\n", marks[i], j + 1);
      }
    }
  }
  return 0;
}


#include <stdio.h>

int main(void) {
  char trumpMark;
  char dummy;
  int trump[4][13];
  int cards;
  int number;

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      trump[i][j] = 0;
    }
  }

  scanf("%d", &cards);

  for (int i = 0; i < cards; i++) {

    scanf("%*c%c", &trumpMark);
    scanf("%d", &number);

    switch (trumpMark) {
    case 'S':
      trump[0][number] = number;
      break;
    case 'H':
      trump[1][number] = number;
      break;
    case 'C':
      trump[2][number] = number;
      break;
    case 'D':
      trump[3][number] = number;
      break;
    }
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (trump[i][j + 1] == 0) {
        switch (i) {
        case 0:
          printf("S %d\\n", j + 1);
          break;
        case 1:
          printf("H %d\\n", j + 1);
          break;
        case 2:
          printf("C %d\\n", j + 1);
          break;
        case 3:
          printf("D %d\\n", j + 1);
          break;
        }
      }
    }
  }
  return 0;
}

#include <stdio.h>

int main(void) {
  char trumpMark;
  char dummy;
  int trump[4][14];
  int cards;
  int number;

  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      trump[i][j] = 0;
    }
  }

  scanf("%d", &cards);

  for (int i = 0; i < cards; i++) {

    scanf("%*c%c", &trumpMark);
    scanf("%d", &number);

    switch (trumpMark) {
    case 'S':
      trump[0][number] = number;
      break;
    case 'H':
      trump[1][number] = number;
      break;
    case 'C':
      trump[2][number] = number;
      break;
    case 'D':
      trump[3][number] = number;
      break;
    }
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      if (trump[i][j] == 0) {
        switch (i) {
        case 0:
          printf("S %d\\n", j);
          break;
        case 1:
          printf("H %d\\n", j);
          break;
        case 2:
          printf("C %d\\n", j);
          break;
        case 3:
          printf("D %d\\n", j);
          break;
        }
      }
    }
  }
  return 0;
}


#include <iostream>

using namespace std;

int main() {

  int cards[4][13];
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j <= 13; j++) {
      cards[i][j] = 0;
    }
  }

  int n;
  cin >> n;
  for (int k = 0; k < n; k++) {
    int num;
    char m;
    cin >> m >> num;
    if (m == 'S') {
      cards[0][num] = 1;
    }
    if (m == 'H') {
      cards[1][num] = 1;
    }
    if (m == 'C') {
      cards[2][num] = 1;
    }
    if (m == 'D') {
      cards[3][num] = 1;
    }
  }

  for (int i = 0; i < 4; i++) {
    for (int j = 1; j <= 13; j++) {
      if (cards[i][j] == 0) {
        if (i == 0) {
          cout << "S " << j << endl;
        }
        if (i == 1) {
          cout << "H " << j << endl;
        }
        if (i == 2) {
          cout << "C " << j << endl;
        }
        if (i == 3) {
          cout << "D " << j << endl;
        }
      }
    }
  }
  return 0;
}


#include <iostream>
using namespace std;
int main() {
  int cards[4][13] = {};
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    char c;
    int a;
    cin >> c >> a;
    for (int j = 0; j < n; j++) {
      if (c == 'S') {
        cards[0][a] = 1;
      } else if (c == 'H') {
        cards[1][a] = 1;
      } else if (c == 'C') {
        cards[2][a] = 1;
      } else {
        cards[3][a] = 1;
      }
    }
  }
  for (int k = 0; k <= 3; k++) {
    for (int l = 1; l <= 13; l++) {
      if (cards[k][l] == 0) {
        if (k == 0) {
          cout << "S " << l << endl;
        }
        if (k == 1) {
          cout << "H " << l << endl;
        }
        if (k == 2) {
          cout << "C " << l << endl;
        }
        if (k == 3) {
          cout << "D " << l << endl;
        }
      }
    }
  }
  return 0;
}

#include <iostream>
using namespace std;
int main() {
  int cards[4][14] = {};
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    char c;
    int a;
    cin >> c >> a;
    for (int j = 0; j < n; j++) {
      if (c == 'S') {
        cards[0][a] = 1;
      } else if (c == 'H') {
        cards[1][a] = 1;
      } else if (c == 'C') {
        cards[2][a] = 1;
      } else {
        cards[3][a] = 1;
      }
    }
  }
  for (int k = 0; k <= 3; k++) {
    for (int l = 1; l <= 13; l++) {
      if (cards[k][l] == 0) {
        if (k == 0) {
          cout << "S " << l << endl;
        }
        if (k == 1) {
          cout << "H " << l << endl;
        }
        if (k == 2) {
          cout << "C " << l << endl;
        }
        if (k == 3) {
          cout << "D " << l << endl;
        }
      }
    }
  }
  return 0;
}


#include <iostream>
#define MARK_MAX 4
#define NUM_MAX 13
#define TF 1
#define GET_MAX 52
using namespace std;

struct mn {
  char mark;
  int num;
  int tf;
};

int main() {
  struct mn set[MARK_MAX][NUM_MAX];
  struct mn get[GET_MAX];
  int m, n, i;

  for (m = 0; m < MARK_MAX; m++) {
    for (n = 0; n = NUM_MAX; n++) {
      if (m == 0) {
        set[m][n].mark = 'S';
      } else if (m == 1) {
        set[m][n].mark = 'H';
      } else if (m == 2) {
        set[m][n].mark = 'C';
      } else if (m == 3) {
        set[m][n].mark = 'D';
      }
      set[m][n].num = n + 1;
      set[m][n].tf = 1;
    }
  }

  int count;
  cin >> count;
  for (int i = 0; i < count; i++) {
    cin >> get[i].mark >> get[i].num;
  }
  for (m = 0; m < MARK_MAX; m++) {
    for (n = 0; n < NUM_MAX; n++) {
      for (i = 0; i < count; i++) {
        if (set[m][n].mark == get[i].mark && set[m][n].num == get[i].num) {
          set[m][n].tf = 0;
        }
      }
      if (set[m][n].tf == 1) {
        cout << set[m][n].mark << ' ' << set[m][n].mark << endl;
      }
    }
  }
  return 0;
}

#include <iostream>
#define MARK_MAX 4
#define NUM_MAX 13
#define TF 1
#define GET_MAX 52
using namespace std;

struct mn {
  char mark;
  int num;
  int tf;
};

int main() {
  struct mn set[MARK_MAX][NUM_MAX];
  struct mn get[GET_MAX];
  int m, n, i;

  for (m = 0; m < MARK_MAX; m++) {
    for (n = 0; n < NUM_MAX; n++) {
      if (m == 0) {
        set[m][n].mark = 'S';
      } else if (m == 1) {
        set[m][n].mark = 'H';
      } else if (m == 2) {
        set[m][n].mark = 'C';
      } else if (m == 3) {
        set[m][n].mark = 'D';
      }
      set[m][n].num = n + 1;
      set[m][n].tf = 1;
    }
  }

  int count;
  cin >> count;
  for (int i = 0; i < count; i++) {
    cin >> get[i].mark >> get[i].num;
  }
  for (m = 0; m < MARK_MAX; m++) {
    for (n = 0; n < NUM_MAX; n++) {
      for (i = 0; i < count; i++) {
        if (set[m][n].mark == get[i].mark && set[m][n].num == get[i].num) {
          set[m][n].tf = 0;
        }
      }
      if (set[m][n].tf == 1) {
        cout << set[m][n].mark << ' ' << set[m][n].num << endl;
      }
    }
  }
  return 0;
}


#include <stdio.h>
using namespace std;

int main(void) {
  char pattern;
  int n, rank;
  bool card[4][13];

  for (int i = 0; i < 4; ++i) {
    for (int j = 0; i < 13; ++j) {
      card[i][j] = false;
    }
  }

  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%c %d", &pattern, &rank);
    if (pattern == 'S') {
      card[0][rank - 1] = true;
    } else if (pattern == 'H') {
      card[1][rank - 1] = true;
    } else if (pattern == 'C') {
      card[2][rank - 1] = true;
    } else if (pattern == 'D') {
      card[3][rank - 1] = true;
    }
  }

  for (int i = 0; i < 4; ++i) {
    for (int j = 0; i < 13; ++j) {
      if (i == 0 && !card[i][j]) {
        printf("S %d\\n", j);
      } else if (i == 0 && !card[i][j]) {
        printf("H %d\\n", j);
      } else if (i == 0 && !card[i][j]) {
        printf("C %d\\n", j);
      } else if (i == 0 && !card[i][j]) {
        printf("D %d\\n", j);
      }
    }
  }
  return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;

int main(void) {
  char pattern;
  int n, rank;
  bool card[4][13];

  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 13; ++j) {
      card[i][j] = false;
    }
  }

  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> pattern >> rank;
    if (pattern == 'S') {
      card[0][rank - 1] = true;
    } else if (pattern == 'H') {
      card[1][rank - 1] = true;
    } else if (pattern == 'C') {
      card[2][rank - 1] = true;
    } else if (pattern == 'D') {
      card[3][rank - 1] = true;
    }
  }

  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 13; ++j) {
      if (i == 0 && card[i][j] == false) {
        printf("S %d\\n", j + 1);
      } else if (i == 1 && card[i][j] == false) {
        printf("H %d\\n", j + 1);
      } else if (i == 2 && card[i][j] == false) {
        printf("C %d\\n", j + 1);
      } else if (i == 3 && card[i][j] == false) {
        printf("D %d\\n", j + 1);
      }
    }
  }
  return 0;
}


#include <iostream>
using namespace std;
int main() {

  // 変数宣言&初期化
  char ch; // 絵柄代入用
  int num[52], total;
  bool card[4][13];

  cin >> total;

  // 入力
  for (int i = 0; i < total; i++) {
    for (int n = 0; i < 4; n++) {
      cin >> ch >> num[i];

      if (ch == 'S') {
        card[0][num[i]] = true;
      }

      if (ch == 'H') {
        card[1][num[i]] = true;
      }

      if (ch == 'C') {
        card[2][num[i]] = true;
      }

      if (ch == 'D') {
        card[3][num[i]] = true;
      }
    }
  }

  // 不足しているカードの特定
  for (int j = 0; j < 4; j++) {

    for (int i = 0; i < 14; i++) {

      if (card[j][i] == false && i != 0) {

        // 絵柄特定
        if (j == 0) {
          cout << "S " << i << endl;
        }

        if (j == 1) {
          cout << "H " << i << endl;
        }

        if (j == 2) {
          cout << "C " << i << endl;
        }

        if (j == 3) {
          cout << "D " << i << endl;
        }
      }
    }
  }

  return 0;
}


#include <algorithm>
#include <iostream>
#define _USE_MATH_DEFINES
#include <functional>
#include <map>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;

int n;
bool list[4][13];
vector<int> v;
map<char, int> m;
int main() {
  m['S'] = 0;
  m['H'] = 1;
  m['C'] = 2;
  m['D'] = 3;

  cin >> n;

  for (int i = 0; i < n; ++i) {
    int num;
    char c;
    cin >> c >> num;
    num--;
    list[m[c]][num] = true;
  }

  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 13;) {
      if (!list[i][j]) {
        char c = 'z';
        switch (i) {
        case 0:
          c = 'S';
          break;
        case 1:
          c = 'H';
          break;
        case 2:
          c = 'C';
          break;
        default:
          c = 'D';
          break;
        }
        cout << c << " " << j + 1 << endl;
      }
    }
  }

  return 0;
}

#include <algorithm>
#include <iostream>
#define _USE_MATH_DEFINES
#include <functional>
#include <map>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;

int n;
bool list[4][13];
vector<int> v;
map<char, int> m;
int main() {
  m['S'] = 0;
  m['H'] = 1;
  m['C'] = 2;
  m['D'] = 3;

  cin >> n;

  for (int i = 0; i < n; ++i) {
    int num;
    char c;
    cin >> c >> num;
    num--;
    list[m[c]][num] = true;
  }

  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 13; ++j) {
      if (!list[i][j]) {
        char c = 'z';
        switch (i) {
        case 0:
          c = 'S';
          break;
        case 1:
          c = 'H';
          break;
        case 2:
          c = 'C';
          break;
        default:
          c = 'D';
          break;
        }
        cout << c << " " << j + 1 << endl;
      }
    }
  }

  return 0;
}


#include <cstdio>

int main() {
  int n, card;
  char type;
  int trump[4][13];
  int given_type;
  scanf("%d", &n);
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      trump[i][j - 1] = j;
    }
  }
  for (int i = 0; i < n; i++) {
    scanf("%c %d", &type, &card);
    if (type == 'S') {
      given_type = 0;
    } else if (type == 'H') {
      given_type = 1;
    } else if (type == 'C') {
      given_type = 2;
    } else if (type == 'D') {
      given_type = 3;
    }
    trump[given_type][card - 1] = 0;
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      int check = trump[i][j - 1];
      if (0 < check) {
        if (i == 0) {
          printf("%c %d\\n", 'S', check);
        } else if (i == 1) {
          printf("%c %d\\n", 'H', check);
        } else if (i == 2) {
          printf("%c %d\\n", 'C', check);
        } else if (i == 3) {
          printf("%c %d\\n", 'S', check);
        }
      }
    }
  }
}

#include <cstdio>

int main() {
  int n, card;
  char type;
  int trump[4][14];
  int given_type;
  scanf("%d", &n);
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      trump[i][j - 1] = j;
    }
  }
  for (int i = 0; i < n; i++) {
    scanf(" %c %d", &type, &card);
    if (type == 'S') {
      given_type = 0;
    } else if (type == 'H') {
      given_type = 1;
    } else if (type == 'C') {
      given_type = 2;
    } else if (type == 'D') {
      given_type = 3;
    }
    trump[given_type][card - 1] = 0;
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      int check = trump[i][j - 1];
      if (0 < check) {
        if (i == 0) {
          printf("%c %d\\n", 'S', check);
        } else if (i == 1) {
          printf("%c %d\\n", 'H', check);
        } else if (i == 2) {
          printf("%c %d\\n", 'C', check);
        } else if (i == 3) {
          printf("%c %d\\n", 'D', check);
        }
      }
    }
  }
  return 0;
}