#include <bits/stdc++.h>
using namespace std;
const long long p = 239, mod = 1000000007;
long long n, k = 0;
unordered_map<string, int> qq, qq1;
vector<pair<vector<string>, string> > cc;
vector<vector<string> > ans;
string s, s1, s2;
int main() {
  iostream::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < int(n); i++) {
    cin >> s;
    if (qq1[s]) {
      continue;
    }
    qq1[s] = 1;
    s1 = "";
    s2 = "";
    int ii = 7;
    for (; ii < (int)s.size(); ii++) {
      if (s[ii] == '/') {
        break;
      }
      s1 += s[ii];
    }
    for (; ii < (int)s.size(); ii++) {
      s2 += s[ii];
    }
    if (qq[s1] == 0) {
      cc.push_back({{}, s1});
      k++;
      qq[s1] = k;
    }
    cc[qq[s1] - 1].first.push_back(s2);
  }
  for (int i = 0; i < int((int)cc.size()); i++) {
    sort(cc[i].first.begin(), cc[i].first.end());
  }
  sort(cc.begin(), cc.end());
  ans.push_back({cc[0].second});
  for (int i = 1; i < (int)cc.size(); i++) {
    if (cc[i].first != cc[i - 1].first) {
      if ((int)ans[(int)ans.size() - 1].size() == 1) ans.pop_back();
      ans.push_back({});
    }
    ans[(int)ans.size() - 1].push_back(cc[i].second);
  }
  if ((int)ans[(int)ans.size() - 1].size() == 1) ans.pop_back();
  cout << (int)ans.size() << "\n";
  for (int i = 0; i < int((int)ans.size()); i++) {
    for (int j = 0; j < (int)ans[i].size(); j++) {
      cout << "http://" << ans[i][j] << " ";
    }
    cout << endl;
  }
  return 0;
}
