#include <bits/stdc++.h>
using namespace std;
int n;
map<string, vector<string>> mp;
map<vector<string>, vector<string>> ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    s = s.substr(7) + '/';
    int pos = s.find_first_of('/');
    mp[s.substr(0, pos)].push_back(s.substr(pos));
  }
  for (auto &p : mp) {
    sort(p.second.begin(), p.second.end());
    p.second.erase(unique(p.second.begin(), p.second.end()), p.second.end());
    ans[p.second].push_back(p.first);
  }
  int tot = 0;
  for (auto &p : ans)
    if (p.second.size() > 1) tot++;
  cout << tot << endl;
  for (auto &p : ans)
    if (p.second.size() > 1) {
      for (auto &t : p.second) cout << "http://" << t << " ";
      cout << endl;
    }
  return 0;
}
