#include <bits/stdc++.h>
using namespace std;
int q, n, c, c1, c2;
string s, name;
int main() {
  vector<string> all;
  vector<pair<int, string> > t, g, p;
  cin >> q;
  while (q--) {
    cin >> n >> name;
    t.push_back(make_pair(0, name));
    g.push_back(make_pair(0, name));
    p.push_back(make_pair(0, name));
    all.push_back(name);
    for (int i = 0; i < n; ++i) {
      cin >> s;
      if (s[0] == s[1] && s[1] == s[3] && s[3] == s[4] && s[4] == s[6] &&
          s[6] == s[7]) {
        t[c].first++;
        continue;
      }
      if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] &&
          s[6] > s[7]) {
        p[c].first++;
        continue;
      }
      g[c].first++;
    }
    c++;
  }
  sort(t.begin(), t.end());
  sort(g.begin(), g.end());
  sort(p.begin(), p.end());
  cout << "If you want to call a taxi, you should call: ";
  int i = t.size() - 1;
  if (t[i].first != t[i - 1].first)
    cout << t[i].second << ".";
  else {
    bool f = true;
    int c = 1;
    vector<string> repeated;
    repeated.push_back(t[t.size() - 1].second);
    for (i = t.size() - 1; i > 0; --i)
      if (t[i].first == t[i - 1].first)
        repeated.push_back(t[i - 1].second), c++;
      else
        break;
    for (i = 0; i < all.size() && f; ++i)
      for (int j = 0; j < repeated.size(); ++j)
        if (c > 1 && all[i] == repeated[j]) {
          cout << all[i] << ", ";
          c--;
          break;
        } else if (c == 1 && all[i] == repeated[j]) {
          cout << all[i] << ".";
          f = false;
          break;
        }
    repeated.clear();
  }
  cout << "\nIf you want to order a pizza, you should call: ";
  i = p.size() - 1;
  if (p[i].first != p[i - 1].first)
    cout << p[i].second << ".";
  else {
    bool f = true;
    int c = 1;
    vector<string> repeated;
    repeated.push_back(p[p.size() - 1].second);
    for (i = p.size() - 1; i > 0; --i)
      if (p[i].first == p[i - 1].first)
        repeated.push_back(p[i - 1].second), c++;
      else
        break;
    for (i = 0; i < all.size() && f; ++i)
      for (int j = 0; j < repeated.size(); ++j)
        if (c > 1 && all[i] == repeated[j]) {
          cout << all[i] << ", ";
          c--;
          break;
        } else if (c == 1 && all[i] == repeated[j]) {
          cout << all[i] << ".";
          f = false;
          break;
        }
    repeated.clear();
  }
  cout << "\nIf you want to go to a cafe with a wonderful girl, you should "
          "call: ";
  i = t.size() - 1;
  if (g[i].first != g[i - 1].first)
    cout << g[i].second << ".";
  else {
    bool f = true;
    int c = 1;
    vector<string> repeated;
    repeated.push_back(g[g.size() - 1].second);
    for (i = g.size() - 1; i > 0; --i)
      if (g[i].first == g[i - 1].first)
        repeated.push_back(g[i - 1].second), c++;
      else
        break;
    for (i = 0; i < all.size() && f; ++i)
      for (int j = 0; j < repeated.size(); ++j)
        if (c > 1 && all[i] == repeated[j]) {
          cout << all[i] << ", ";
          c--;
          break;
        } else if (c == 1 && all[i] == repeated[j]) {
          cout << all[i] << ".";
          f = false;
          break;
        }
    repeated.clear();
  }
}
