#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<vector<string> > v(1000);
  int ans[500];
  string s[1000];
  for (int i = 0; i < n; i++) {
    int m, a[500] = {};
    cin >> m >> s[i];
    for (int j = 0; j < m; j++) {
      string x = "", x2;
      cin >> x2;
      for (int xx = 0; xx < x2.size(); xx++)
        if (x2[xx] != '-') x += x2[xx];
      map<char, int> mop;
      bool t = 1;
      for (int k = 0; k < x.size() - 1; k++) {
        mop[x[k]]++;
        if (x[k] <= x[k + 1]) {
          t = 0;
        }
      }
      mop[x[x.size() - 1]]++;
      if (mop.size() == 1) {
        a[0]++;
      } else if (t == 1) {
        a[1]++;
      } else {
        a[2]++;
      }
    }
    if (a[0] > ans[0]) {
      ans[0] = a[0];
      v[0].clear();
      v[0].push_back(s[i]);
    } else if (a[0] == ans[0]) {
      v[0].push_back(s[i]);
    }
    if (a[1] > ans[1]) {
      ans[1] = a[1];
      v[1].clear();
      v[1].push_back(s[i]);
    } else if (a[1] == ans[1]) {
      v[1].push_back(s[i]);
    }
    if (a[2] > ans[2]) {
      ans[2] = a[2];
      v[2].clear();
      v[2].push_back(s[i]);
    } else if (a[2] == ans[2]) {
      v[2].push_back(s[i]);
    }
  }
  string txt[4] = {
      "If you want to call a taxi, you should call: ",
      "If you want to order a pizza, you should call: ",
      "If you want to go to a cafe with a wonderful girl, you should call: "};
  for (int i = 0; i < 3; i++) {
    cout << txt[i];
    for (int j = 0; j < v[i].size(); j++) {
      if (j != v[i].size() - 1)
        cout << v[i][j] << ", ";
      else
        cout << v[i][j] << ".";
    }
    cout << endl;
  }
  return 0;
}
