#include <bits/stdc++.h>
using namespace std;
int n, p[111], a[111], b[111], c[111], maxa, maxb, maxc, l;
string s[111], r;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    getline(cin, s[i]);
    for (int j = 1; j <= p[i]; j++) {
      getline(cin, r);
      if (r[0] == r[1] && r[1] == r[3] && r[3] == r[4] && r[4] == r[6] &&
          r[6] == r[7])
        a[i]++;
      else if (r[0] > r[1] && r[1] > r[3] && r[3] > r[4] && r[4] > r[6] &&
               r[6] > r[7])
        b[i]++;
      else
        c[i]++;
    }
    if (a[i] > maxa) maxa = a[i];
    if (b[i] > maxb) maxb = b[i];
    if (c[i] > maxc) maxc = c[i];
  }
  cout << "If you want to call a taxi, you should call:";
  for (int i = 1; i <= n; i++)
    if (a[i] == maxa) {
      if (l != 0) cout << ",";
      cout << s[i];
      l++;
    }
  l = 0;
  cout << ".\n";
  cout << "If you want to order a pizza, you should call:";
  for (int i = 1; i <= n; i++)
    if (b[i] == maxb) {
      if (l != 0) cout << ",";
      cout << s[i];
      l++;
    }
  l = 0;
  cout << ".\n";
  cout << "If you want to go to a cafe with a wonderful girl, you should call:";
  for (int i = 1; i <= n; i++)
    if (c[i] == maxc) {
      if (l != 0) cout << ",";
      cout << s[i];
      l++;
    }
  l = 0;
  cout << ".\n";
  return 0;
}
