#include <bits/stdc++.h>
using namespace std;
void swap(long long int arr[], long long int x, long long int y) {
  long long int temp = arr[x];
  arr[x] = arr[y];
  arr[y] = temp;
}
void print_arr(long long int arr[], long long int n) {
  cout << '\n';
  for (long long int i = 0; i < n; i++) {
    cout << arr[i] << ' ';
  }
  cout << '\n';
}
void input_arr(long long int arr[], long long int n) {
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
  }
}
bool primes[1000001];
int checkstring(string s) {
  int l = s.length();
  string p = "";
  for (int i = 0; i < l; i++) {
    if (s[i] != '-') {
      p += s[i];
    }
  }
  int same = 0;
  int dec = 0;
  for (int i = 1; i < p.length(); i++) {
    if (p[i] == p[i - 1]) {
      same++;
    } else if (p[i] <= p[i - 1]) {
      dec++;
    }
  }
  if (same == p.length() - 1) {
    return 2;
  } else if (dec == p.length() - 1) {
    return 1;
  }
  return 3;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    map<string, long long int> tx;
    map<string, long long int> cg;
    map<string, long long int> pz;
    string abc[n];
    for (int i = 0; i < n; i++) {
      int N;
      string fname;
      cin >> N >> fname;
      abc[i] = fname;
      for (int j = 0; j < N; j++) {
        string s;
        cin >> s;
        int x = checkstring(s);
        if (x == 2) {
          tx[fname]++;
        } else if (x == 3) {
          cg[fname]++;
        } else {
          pz[fname]++;
        }
      }
    }
    int maxp = 0, maxt = 0, maxc = 0;
    vector<string> v[3];
    for (int i = 0; i < n; i++) {
      if (tx[abc[i]] > maxt) {
        maxt = tx[abc[i]];
      }
      if (pz[abc[i]] > maxp) {
        maxp = pz[abc[i]];
      }
      if (cg[abc[i]] > maxc) {
        maxc = cg[abc[i]];
      }
    }
    for (int i = 0; i < n; i++) {
      if (pz[abc[i]] == maxp) {
        v[0].push_back(abc[i]);
      }
      if (cg[abc[i]] == maxc) {
        v[1].push_back(abc[i]);
      }
      if (tx[abc[i]] == maxt) {
        v[2].push_back(abc[i]);
      }
    }
    cout << "If you want to call a taxi, you should call:";
    for (int i = 0; i < v[2].size(); i++) {
      if (i != v[2].size() - 1)
        cout << ' ' << v[2][i] << ',';
      else
        cout << ' ' << v[2][i] << '.';
    }
    cout << '\n';
    cout << "If you want to order a pizza, you should call:";
    for (int i = 0; i < v[0].size(); i++) {
      if (i != v[0].size() - 1)
        cout << ' ' << v[0][i] << ',';
      else
        cout << ' ' << v[0][i] << '.';
    }
    cout << '\n';
    cout << "If you want to go to a cafe with a wonderful girl, you should "
            "call:";
    for (int i = 0; i < v[1].size(); i++) {
      if (i != v[1].size() - 1)
        cout << ' ' << v[1][i] << ',';
      else
        cout << ' ' << v[1][i] << '.';
    }
  }
  return 0;
}
