#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  long long n;
  cin >> n;
  map<string, set<string>> sites;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    long long f = 0, se = 0;
    long long len = s.length();
    for (f = 0; f < len; f++)
      if (s[f] == '/') break;
    for (se = f + 2; se < len; se++)
      if (s[se] == '/') break;
    sites[s.substr(0, se)].insert(s.substr(se));
  }
  map<set<string>, set<string>> res;
  for (auto &ss : sites) {
    res[ss.second].insert(ss.first);
  }
  long long resc = 0;
  for (auto &rr : res)
    if (rr.second.size() > 1) resc++;
  cout << resc << endl;
  for (auto &r : res)
    if (r.second.size() > 1) {
      for (auto &rr : r.second) cout << rr << ' ';
      cout << endl;
    }
  return 0;
}
