#include <bits/stdc++.h>
using namespace std;
int n, was;
string a, host, path;
set<string>::iterator it1;
map<string, set<string> > g;
map<string, set<string> >::iterator iter;
map<set<string>, vector<string> > res, final_res;
map<set<string>, vector<string> >::iterator it;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    host.clear();
    path.clear();
    was = 0;
    cin >> a;
    for (int j = 0; j < a.size(); j++) {
      if (a[j] == '/') was++;
      if (was >= 3) path += a[j];
      if (was == 2) host += a[j];
    }
    g[host].insert(path);
  }
  for (iter = g.begin(); iter != g.end(); iter++)
    res[(*iter).second].push_back((*iter).first);
  for (it = res.begin(); it != res.end(); it++)
    if (res[(*it).first].size() > 1) final_res[(*it).first] = res[(*it).first];
  printf("%d\n", final_res.size());
  for (it = final_res.begin(); it != final_res.end(); it++) {
    for (int i = 0; i < final_res[(*it).first].size(); i++) {
      printf("http:/");
      cout << final_res[(*it).first][i] << " ";
    }
    printf("\n");
  }
}
