#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int msz = 10000;
const int mod = 1e9 + 7;
const double eps = 1e-8;
map<set<long long>, int> mp;
map<string, int> maap;
set<long long> v[233333];
vector<int> s[233333];
int sz[233333];
char str[233333][44];
int tp;
int main() {
  int n;
  scanf("%d\n", &n);
  tp = 0;
  memset(sz, 0, sizeof(sz));
  while (n--) {
    scanf("http://%s\n", str[tp]);
    long long tmp = 1;
    int cut;
    for (cut = 0; str[tp][cut]; ++cut)
      if (str[tp][cut] == '/') break;
    for (int i = cut; str[tp][i]; ++i) {
      if (str[tp][i] == '.')
        tmp = tmp * 100 + 26;
      else if (str[tp][i] == '/')
        tmp = tmp * 100 + 27;
      else
        tmp = tmp * 100 + str[tp][i] - 'a';
    }
    str[tp][cut] = 0;
    int id;
    if (!maap.count(str[tp])) {
      maap[str[tp]] = tp;
      id = tp++;
    } else
      id = maap[str[tp]];
    v[id].insert(tmp);
  }
  int tpp = 0;
  int k = 0;
  for (int i = 0; i < tp; ++i) {
    int id;
    if (mp.count(v[i])) {
      id = mp[v[i]];
    } else {
      mp[v[i]] = tpp;
      id = tpp++;
    }
    s[id].push_back(i);
    sz[id]++;
    if (sz[id] == 2) k++;
  }
  printf("%d\n", k);
  for (int i = 0; i < tp; ++i) {
    if (sz[i] < 2) continue;
    for (int j = 0; j < sz[i]; ++j) {
      printf("http://%s ", str[s[i][j]]);
    }
    puts("");
  }
  return 0;
}
