#include <bits/stdc++.h>
using namespace std;
const long double Pi = 3.141592653;
const unsigned long long mod = 1e9 + 7;
int check(string s) {
  if (s[0] == s[1] && s[1] == s[3] && s[3] == s[4] && s[4] == s[6] &&
      s[6] == s[7])
    return 1;
  else if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] &&
           s[6] > s[7])
    return 2;
  else
    return 3;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    vector<string> name;
    int cnt[n][3];
    memset(cnt, 0, sizeof(cnt));
    for (int i = 0; i < n; i++) {
      int p;
      string s;
      cin >> p >> s;
      name.push_back(s);
      for (int j = 0; j < p; j++) {
        string temp;
        cin >> temp;
        if (check(temp) == 1)
          cnt[i][0]++;
        else if (check(temp) == 2)
          cnt[i][1]++;
        else if (check(temp) == 3)
          cnt[i][2]++;
      }
    }
    int a = INT_MIN, b = INT_MIN, c = INT_MIN;
    vector<int> v1, v2, v3;
    for (int i = 0; i < n; i++) {
      if (cnt[i][0] > a) a = cnt[i][0];
    }
    for (int i = 0; i < n; i++) {
      if (cnt[i][1] > b) b = cnt[i][1];
    }
    for (int i = 0; i < n; i++) {
      if (cnt[i][2] > c) c = cnt[i][2];
    }
    for (int i = 0; i < n; i++) {
      if (cnt[i][0] == a) v1.push_back(i);
    }
    for (int i = 0; i < n; i++) {
      if (cnt[i][1] == b) v2.push_back(i);
    }
    for (int i = 0; i < n; i++) {
      if (cnt[i][2] == c) v3.push_back(i);
    }
    cout << "If you want to call a taxi, you should call: ";
    for (int i = 0; i < v1.size(); i++) {
      if (i == v1.size() - 1)
        cout << name[v1[i]] << ".";
      else
        cout << name[v1[i]] << ", ";
    }
    cout << "\n";
    cout << "If you want to order a pizza, you should call: ";
    for (int i = 0; i < v2.size(); i++) {
      if (i == v2.size() - 1)
        cout << name[v2[i]] << ".";
      else
        cout << name[v2[i]] << ", ";
    }
    cout << "\n";
    cout << "If you want to go to a cafe with a wonderful girl, you should "
            "call: ";
    for (int i = 0; i < v3.size(); i++) {
      if (i == v3.size() - 1)
        cout << name[v3[i]] << ".";
      else
        cout << name[v3[i]] << ", ";
    }
    cout << "\n";
  }
  return 0;
}
