#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
bool compare(T x, U y) {
  return (abs(x - y) <= 1e-9);
}
const int MOD = 1e9 + 7;
void print(vector<string> v) {
  int n = (int)v.size();
  if (!n) {
    cout << "."
         << "\n";
    return;
  }
  for (int i = 0; i < n - 1; i++) cout << v[i] << ", ";
  cout << v.back() << "."
       << "\n";
}
void solve() {
  int n;
  cin >> n;
  map<string, vector<int> > mp;
  int m1 = 0, m2 = 0, m3 = 0;
  vector<string> preserve;
  while (n--) {
    int x;
    string s;
    cin >> x >> s;
    preserve.push_back(s);
    mp[s].resize(3);
    for (int i = 1; i <= x; i++) {
      string t;
      cin >> t;
      string word;
      set<int> s1;
      string k;
      stringstream str(t);
      while (getline(str, word, '-')) {
        reverse(word.begin(), word.end());
        int x = stoi(word);
        while (x) {
          s1.insert(x % 10);
          k.push_back(x % 10 + '0');
          x /= 10;
        }
      }
      if ((int)s1.size() <= 1)
        mp[s][0]++;
      else {
        bool no = 0;
        for (int j = 0; j < 5; j++)
          if (k[j] <= k[j + 1]) {
            no = 1;
            break;
          }
        if (!no) {
          mp[s][1]++;
        } else {
          mp[s][2]++;
        }
      }
      m1 = max(m1, mp[s][0]);
      m2 = max(m2, mp[s][1]);
      m3 = max(m3, mp[s][2]);
    }
  }
  vector<string> taxi, pizza, call_girl;
  for (auto &x : preserve) {
    if (mp[x][0] == m1) taxi.push_back(x);
    if (mp[x][1] == m2) pizza.push_back(x);
    if (mp[x][2] == m3) call_girl.push_back(x);
  }
  cout << "If you want to call a taxi, you should call: ";
  print(taxi);
  cout << "If you want to order a pizza, you should call: ";
  print(pizza);
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  print(call_girl);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
}
