#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  unordered_map<string, unordered_map<string, int>> mp;
  vector<string> names;
  while (t--) {
    int n;
    cin >> n;
    string name;
    cin >> name;
    names.push_back(name);
    while (n--) {
      string s;
      cin >> s;
      string temp = "";
      for (auto x : s) {
        if (x != '-') {
          temp += x;
        }
      }
      unordered_set<char> se;
      for (int i = 0; i < temp.size(); ++i) {
        se.insert(temp[i]);
      }
      if (se.size() == 1) {
        mp[name]["taxi"]++;
      } else {
        if (se.size() == temp.size()) {
          bool check = true;
          for (int i = 0; i < temp.size() - 1; ++i) {
            if (temp[i] - '0' <= temp[i + 1] - '0') {
              check = false;
              break;
            }
          }
          if (check) {
            mp[name]["pizza"]++;
          } else {
            mp[name]["girls"]++;
          }
        } else {
          mp[name]["girls"]++;
        }
      }
    }
  }
  vector<pair<int, string>> v;
  string first, second, third;
  int m = 0;
  string temp = "If you want to call a taxi, you should call:";
  for (auto x : names) {
    m = max(m, mp[x]["taxi"]);
  }
  for (auto x : names) {
    if (mp[x]["taxi"] == m) {
      temp += " " + x + ",";
    }
  }
  cout << temp.substr(0, temp.size() - 1);
  cout << ".\n";
  m = 0;
  temp = "If you want to order a pizza, you should call:";
  for (auto x : names) {
    m = max(m, mp[x]["pizza"]);
  }
  for (auto x : names) {
    if (mp[x]["pizza"] == m) {
      temp += " " + x + ",";
    }
  }
  cout << temp.substr(0, temp.size() - 1);
  cout << ".\n";
  m = 0;
  temp = "If you want to go to a cafe with a wonderful girl, you should call:";
  for (auto x : names) {
    m = max(mp[x]["girls"], m);
  }
  for (auto x : names) {
    if (mp[x]["girls"] == m) {
      temp += " " + x + ",";
    }
  }
  cout << temp.substr(0, temp.size() - 1);
  cout << ".";
}
