#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
int n, m, ans;
map<string, set<string>> paths;
map<set<string>, int> idx;
vector<string> vec[maxn];
char s[100];
int main() {
  scanf("%d", &n);
  while (n--) {
    scanf("%s", s);
    string hostname = "http://", path;
    int i;
    for (i = 7; s[i] && s[i] != '/';) hostname += s[i++];
    for (; s[i];) path += s[i++];
    paths[hostname].insert(path);
  }
  for (auto p : paths) {
    if (!idx.count(p.second)) idx[p.second] = m++;
    vec[idx[p.second]].push_back(p.first);
  }
  for (int i = 0; i < m; i++) ans += vec[i].size() > 1;
  printf("%d\n", ans);
  for (int i = 0; i < m; i++) {
    if (vec[i].size() == 1) continue;
    for (string s : vec[i]) printf("%s ", s.c_str());
    puts("");
  }
}
