#include <bits/stdc++.h>
using namespace std;
inline long double min(long double a, long double b) {
  if (a < b) return a;
  return b;
}
inline long double max(long double a, long double b) {
  if (a < b) return b;
  return a;
}
int n;
set<string> uset;
void solve() {
  map<string, vector<string>> arr;
  for (auto(i) = uset.begin(); (i) != uset.end(); ++(i)) {
    string temp = *i;
    int pos = temp.find("/", 7);
    string sub;
    if (pos != -1)
      sub = temp.substr(pos);
    else
      sub = "";
    temp = temp.substr(0, pos);
    arr[temp].push_back(sub);
  }
  map<vector<string>, vector<string>> res;
  for (auto(i) = arr.begin(); (i) != arr.end(); ++(i)) {
    sort(i->second.begin(), i->second.end());
    res[i->second].push_back(i->first);
  }
  int c = 0;
  for (auto(i) = res.begin(); (i) != res.end(); ++(i)) {
    if (i->second.size() > 1) c++;
  }
  cout << c << endl;
  for (auto(i) = res.begin(); (i) != res.end(); ++(i)) {
    if (i->second.size() > 1) {
      for (int(j) = (0); (j) < (i->second.size()); ++(j))
        cout << i->second[j] << " ";
      cout << endl;
    }
  }
}
int main() {
  set<vector<string>> hehe;
  cin >> n;
  for (int(i) = (0); (i) < (n); ++(i)) {
    string s;
    cin >> s;
    uset.insert(s);
  }
  solve();
  return 0;
}
