#include <bits/stdc++.h>
long long int mod = 1000000007;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  map<string, pair<int, pair<int, int>>> m;
  vector<string> v;
  int mxp = 0, mxt = 0, mxg = 0;
  for (int i = 0; i < n; i++) {
    int x;
    string s;
    cin >> x >> s;
    v.push_back(s);
    while (x--) {
      string str;
      cin >> str;
      if (str[0] == str[1] && str[1] == str[3] && str[3] == str[4] &&
          str[4] == str[6] && str[6] == str[7])
        m[s].first++;
      else if (str[0] > str[1] && str[1] > str[3] && str[3] > str[4] &&
               str[4] > str[6] && str[6] > str[7])
        m[s].second.first++;
      else
        m[s].second.second++;
    }
    mxp = max(mxp, m[s].second.first);
    mxt = max(mxt, m[s].first);
    mxg = max(mxg, m[s].second.second);
  }
  cout << "If you want to call a taxi, you should call: ";
  int j = 0;
  for (int i = 0; i < v.size(); i++) {
    if (m[v[i]].first == mxt || mxt == 0) {
      if (j != 0) cout << ", ";
      cout << v[i];
      j++;
    }
  }
  j = 0;
  cout << "." << endl << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < v.size(); i++) {
    if (m[v[i]].second.first == mxp || mxp == 0) {
      if (j != 0) cout << ", ";
      cout << v[i];
      j++;
    }
  }
  j = 0;
  cout
      << "." << endl
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < v.size(); i++) {
    if (m[v[i]].second.second == mxg || mxg == 0) {
      if (j != 0) cout << ", ";
      cout << v[i];
      j++;
    }
  }
  cout << ".";
  return 0;
}
