#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s[n];
  vector<vector<int> > v;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x >> s[i];
    vector<int> tmp(3, 0);
    for (int j = 0; j < x; j++) {
      char num[6];
      cin >> num[0] >> num[1] >> num[2] >> num[2] >> num[3] >> num[4] >>
          num[4] >> num[5];
      bool a = 1, b = 1;
      for (int i = 0; i < 5; i++) {
        if (num[i] != num[i + 1]) a = 0;
        if (num[i] <= num[i + 1]) b = 0;
      }
      tmp[0] += a;
      tmp[1] += b;
    }
    tmp[2] = x - tmp[1] - tmp[0];
    v.push_back(tmp);
  }
  cout << "If you want to call a taxi, you should call:";
  long long mx = 0;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    if (v[i][0] > mx) {
      ans.clear();
      mx = v[i][0];
      ans.push_back(i);
    } else if (v[i][0] == mx) {
      ans.push_back(i);
    }
  }
  for (int i = 0; i < ans.size(); i++) {
    if (i == ans.size() - 1)
      cout << " " << s[ans[i]] << "."
           << "\n";
    else
      cout << " " << s[ans[i]] << ",";
  }
  cout << "If you want to order a pizza, you should call:";
  mx = 0;
  ans.clear();
  for (int i = 0; i < n; i++) {
    if (v[i][1] > mx) {
      ans.clear();
      mx = v[i][1];
      ans.push_back(i);
    } else if (v[i][1] == mx) {
      ans.push_back(i);
    }
  }
  for (int i = 0; i < ans.size(); i++) {
    if (i == ans.size() - 1)
      cout << " " << s[ans[i]] << "."
           << "\n";
    else
      cout << " " << s[ans[i]] << ",";
  }
  cout << "If you want to go to a cafe with a wonderful girl, you should call:";
  mx = 0;
  ans.clear();
  for (int i = 0; i < n; i++) {
    if (v[i][2] > mx) {
      ans.clear();
      mx = v[i][2];
      ans.push_back(i);
    } else if (v[i][2] == mx) {
      ans.push_back(i);
    }
  }
  for (int i = 0; i < ans.size(); i++) {
    if (i == ans.size() - 1)
      cout << " " << s[ans[i]] << "."
           << "\n";
    else
      cout << " " << s[ans[i]] << ",";
  }
  return 0;
}
