#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, ii, i, cnt = 0;
  string url, host, path;
  map<string, set<string>> mp_host;
  map<set<string>, vector<string>> mp_path;
  cin >> n;
  for (ii = 0; ii < n; ii++) {
    cin >> url;
    host = "";
    path = "";
    for (i = 7; i < url.size(); i++) {
      if (url[i] == '/') break;
      host += url[i];
    }
    for (; i < url.size(); i++) {
      path += url[i];
    }
    if (mp_host.find(host) == mp_host.end()) {
      set<string> tmp;
      mp_host[host] = tmp;
    }
    mp_host[host].insert(path);
  }
  for (map<string, set<string>>::iterator it = mp_host.begin();
       it != mp_host.end(); it++) {
    if (mp_path.find(it->second) == mp_path.end()) {
      vector<string> tmp;
      mp_path[it->second] = tmp;
    }
    mp_path[it->second].emplace_back(it->first);
  }
  for (map<set<string>, vector<string>>::iterator it = mp_path.begin();
       it != mp_path.end(); it++) {
    if (it->second.size() != 1) {
      cnt++;
    }
  }
  cout << cnt << '\n';
  for (map<set<string>, vector<string>>::iterator it = mp_path.begin();
       it != mp_path.end(); it++) {
    if (it->second.size() != 1) {
      for (i = 0; i < it->second.size(); i++) {
        cout << "http://" << it->second[i] << " \n"[i + 1 == it->second.size()];
      }
    }
  }
}
