#include <bits/stdc++.h>
using namespace std;
string S;
bool isTaxi() {
  if (S[0] == S[1] && S[1] == S[3] && S[3] == S[4] && S[4] == S[6] &&
      S[6] == S[7]) {
    return true;
  } else {
    return false;
  }
}
bool isPizza() {
  if (S[0] > S[1] && S[1] > S[3] && S[3] > S[4] && S[4] > S[6] && S[6] > S[7]) {
    return true;
  } else {
    return false;
  }
}
signed main() {
  int n;
  cin >> n;
  pair<int, string> s[n];
  int nums[n][3];
  memset(nums, 0, sizeof(nums));
  for (int i = 0; i < n; i++) {
    cin >> s[i].first >> s[i].second;
    for (int j = 0; j < s[i].first; j++) {
      cin >> S;
      if (isTaxi()) {
        nums[i][0]++;
      } else if (isPizza()) {
        nums[i][1]++;
      } else {
        nums[i][2]++;
      }
    }
  }
  int taxi = 0;
  int pizza = 0;
  int girl = 0;
  for (int i = 0; i < n; i++) {
    if (nums[taxi][0] < nums[i][0]) {
      taxi = i;
    }
    if (nums[pizza][1] < nums[i][1]) {
      pizza = i;
    }
    if (nums[girl][2] < nums[i][2]) {
      girl = i;
    }
  }
  cout << "If you want to call a taxi, you should call: " + s[taxi].second;
  for (int i = 0; i < n; i++) {
    if (nums[i][0] == nums[taxi][0] && taxi != i) {
      cout << ", " + s[i].second;
    }
  }
  cout << '.' << endl;
  cout << "If you want to order a pizza, you should call: " + s[pizza].second;
  for (int i = 0; i < n; i++) {
    if (nums[i][1] == nums[pizza][1] && pizza != i) {
      cout << ", " + s[i].second;
    }
  }
  cout << '.' << endl;
  cout << "If you want to go to a cafe with a wonderful girl, you should "
          "call: " +
              s[girl].second;
  for (int i = 0; i < n; i++) {
    if (nums[i][2] == nums[girl][2] && girl != i) {
      cout << ", " + s[i].second;
    }
  }
  cout << '.' << endl;
}
