#include <bits/stdc++.h>
using namespace std;
int main() {
  bool taxi = false, pizza = false;
  bool first = true;
  int n, i, j, a[110], x, c = 0, z, a1, a2, b1, b2, c1, c2;
  map<string, int> p, g, t;
  vector<string> s;
  string k, tel;
  cin >> n;
  while (n--) {
    cin >> z >> k;
    s.push_back(k);
    for (i = 0; i < z; i++) {
      taxi = pizza = true;
      scanf("%1d%1d-%1d%1d-%1d%1d", &a1, &a2, &b1, &b2, &c1, &c2);
      if (a1 == a2 && a2 == b1 && b1 == b2 && b2 == c2 && c2 == c1)
        t[k]++;
      else if (a1 > a2 && a2 > b1 && b1 > b2 && b2 > c1 && c1 > c2)
        p[k]++;
      else
        g[k]++;
    }
  }
  for (i = 0; i < s.size(); i++) {
    c = max(c, t[s[i]]);
  }
  cout << "If you want to call a taxi, you should call: ";
  for (i = 0; i < s.size(); i++) {
    if (t[s[i]] == c && first) {
      cout << s[i];
      first = false;
    } else if (t[s[i]] == c && !first)
      cout << ", " << s[i];
  }
  cout << "." << endl;
  first = true;
  c = 0;
  for (i = 0; i < s.size(); i++) {
    c = max(c, p[s[i]]);
  }
  cout << "If you want to order a pizza, you should call: ";
  for (i = 0; i < s.size(); i++) {
    if (p[s[i]] == c && first) {
      cout << s[i];
      first = false;
    } else if (p[s[i]] == c && !first)
      cout << ", " << s[i];
  }
  cout << "." << endl;
  first = true;
  c = 0;
  for (i = 0; i < s.size(); i++) {
    c = max(c, g[s[i]]);
  }
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (i = 0; i < s.size(); i++) {
    if (g[s[i]] == c && first) {
      cout << s[i];
      first = false;
    } else if (g[s[i]] == c && !first)
      cout << ", " << s[i];
  }
  cout << "." << endl;
  return 0;
}
