#include <bits/stdc++.h>
using namespace std;
struct str {
  string name;
  int taxi = 0;
  int pizza = 0;
  int girls = 0;
};
int main() {
  {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
  }
  int t;
  cin >> t;
  struct str st[t];
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    st[i].name = s;
    for (int j = 0; j < n; j++) {
      string tem;
      cin >> tem;
      string tt = "";
      set<char> se;
      for (int k = 0; k < (int)tem.size(); k++) {
        if (isdigit(tem[k])) {
          tt += tem[k];
          se.insert(tem[k]);
        }
      }
      if (se.size() == 1)
        st[i].taxi++;
      else {
        bool ok = true;
        for (int k = 0; k < (int)tt.size() - 1; k++) {
          if (tt[k] <= tt[k + 1]) {
            ok = false;
            break;
          }
        }
        if (ok)
          st[i].pizza++;
        else
          st[i].girls++;
      }
    }
  }
  int maxt = st[0].taxi;
  vector<string> ans;
  for (int i = 0; i < t; i++) {
    if (st[i].taxi > maxt) {
      ans.clear();
      maxt = st[i].taxi;
      ans.push_back(st[i].name);
    } else if (st[i].taxi == maxt)
      ans.push_back(st[i].name);
  }
  cout << "If you want to call a taxi, you should call: ";
  int c = 1;
  for (auto i : ans) {
    if (c == (int)ans.size())
      cout << i;
    else
      cout << i << ", ";
    c++;
  }
  cout << ".\n";
  maxt = st[0].pizza;
  ans.clear();
  for (int i = 0; i < t; i++) {
    if (st[i].pizza > maxt) {
      ans.clear();
      maxt = st[i].pizza;
      ans.push_back(st[i].name);
    } else if (st[i].pizza == maxt)
      ans.push_back(st[i].name);
  }
  cout << "If you want to order a pizza, you should call: ";
  c = 1;
  for (auto i : ans) {
    if (c == (int)ans.size())
      cout << i;
    else
      cout << i << ", ";
    c++;
  }
  cout << ".\n";
  maxt = st[0].girls;
  ans.clear();
  for (int i = 0; i < t; i++) {
    if (st[i].girls > maxt) {
      ans.clear();
      maxt = st[i].girls;
      ans.push_back(st[i].name);
    } else if (st[i].girls == maxt)
      ans.push_back(st[i].name);
  }
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  c = 1;
  for (auto i : ans) {
    if (c == (int)ans.size())
      cout << i;
    else
      cout << i << ", ";
    c++;
  }
  cout << ".\n";
}
