#include <bits/stdc++.h>
using namespace std;
struct pt {
  int t, p, g;
};
pt a[110];
string s[110];
int d1, d2, d3;
char c1, c2;
vector<string> ans1, ans2, ans3;
int main() {
  int n, x, ind1 = 0, ind2 = 0, ind3 = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    a[i].t = a[i].g = a[i].p = 0;
    cin >> x >> s[i];
    for (int j = 0; j < x; j++) {
      cin >> d1 >> c1 >> d2 >> c2 >> d3;
      if (d1 / 10 == d1 % 10 && d1 % 10 == d2 / 10 && d2 / 10 == d2 % 10 &&
          d2 % 10 == d3 / 10 && d3 / 10 == d3 % 10)
        a[i].t++;
      else if (d1 / 10 > d1 % 10 && d1 % 10 > d2 / 10 && d2 / 10 > d2 % 10 &&
               d2 % 10 > d3 / 10 && d3 / 10 > d3 % 10)
        a[i].p++;
      else
        a[i].g++;
    }
    if (a[i].t > a[ind1].t) ind1 = i;
    if (a[i].p > a[ind2].p) ind2 = i;
    if (a[i].g > a[ind3].g) ind3 = i;
  }
  for (int i = 0; i < n; i++) {
    if (a[i].t == a[ind1].t) ans1.push_back(s[i]);
    if (a[i].p == a[ind2].p) ans2.push_back(s[i]);
    if (a[i].g == a[ind3].g) ans3.push_back(s[i]);
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < (int)ans1.size() - 1; i++) cout << ans1[i] << ", ";
  cout << ans1.back() << ".\n";
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < (int)ans2.size() - 1; i++) cout << ans2[i] << ", ";
  cout << ans2.back() << ".\n";
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < (int)ans3.size() - 1; i++) cout << ans3[i] << ", ";
  cout << ans3.back() << ".\n";
  return 0;
}
