#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFF = 0x3f3f;
const double pi = acos(-1.0);
const double inf = 1e18;
const long long mod = 1e9 + 7;
const unsigned long long mx = 1333333331;
inline void RI(int &x) {
  char c;
  while ((c = getchar()) < '0' || c > '9')
    ;
  x = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0';
}
string a[100005];
map<string, int> id;
map<string, int> idd;
map<pair<int, int>, int> vis;
map<unsigned long long, int> h;
vector<int> v[100005], vv[100005];
string ans[100005];
int main() {
  int n;
  while (cin >> n) {
    id.clear();
    idd.clear();
    h.clear();
    vis.clear();
    for (int i = 0; i < n; i++) cin >> a[i];
    int cnt = 0;
    int tmp = 1;
    for (int i = 0; i < n; i++) {
      int flag = 0;
      string s = "";
      string ss = "";
      for (int j = 0; j < a[i].size(); j++) {
        if (a[i][j] == '/' && a[i][j - 1] != '/' && a[i][j + 1] != '/')
          flag = 1;
        if (flag == 0)
          s = s + a[i][j];
        else
          ss = ss + a[i][j];
      }
      if (!id.count(s)) {
        id[s] = cnt++;
        ans[cnt - 1] = s;
      }
      if (!idd.count(ss)) idd[ss] = tmp++;
      if (!vis.count(make_pair(id[s], idd[ss]))) {
        vis[make_pair(id[s], idd[ss])] = 1;
        v[id[s]].push_back(idd[ss]);
      }
    }
    int ha = 0;
    for (int i = 0; i < cnt; i++) {
      unsigned long long x = 0;
      sort(v[i].begin(), v[i].end());
      for (int j = 0; j < v[i].size(); j++) x = x * mx + v[i][j];
      if (!h.count(x)) h[x] = ha++;
      vv[h[x]].push_back(i);
    }
    int ret = 0;
    for (int i = 0; i < ha; i++) {
      if (vv[i].size() > 1) ret++;
    }
    cout << ret << endl;
    for (int i = 0; i < ha; i++) {
      if (vv[i].size() <= 1) continue;
      for (int j = 0; j < vv[i].size(); j++) {
        cout << ans[vv[i][j]];
        if (j == vv[i].size() - 1)
          printf("\n");
        else
          printf(" ");
      }
    }
  }
  return 0;
}
