#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 6;
char z[N];
int main() {
  map<string, set<string>> q;
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%s", &z);
    string s = z;
    int k = s.length();
    for (int j = 7; j < s.length(); ++j)
      if (s[j] == '/') {
        k = j;
        break;
      }
    q[s.substr(0, k)].insert(s.substr(k));
  }
  vector<pair<string, string>> v;
  for (auto &g : q) {
    string c;
    for (string s : g.second) c += s + "$";
    v.push_back({c, g.first});
  }
  sort(v.begin(), v.end());
  vector<pair<string, vector<string>>> res;
  for (auto p : v) {
    if (res.size() && res.back().first == p.first)
      res.back().second.push_back(p.second);
    else
      res.push_back({p.first, {p.second}});
  }
  int ans = 0;
  for (auto &p : res) ans += p.second.size() > 1;
  printf("%d\n", ans);
  for (auto &p : res)
    if (p.second.size() > 1) {
      for (string s : p.second) printf("%s ", s.c_str());
      printf("\n");
    }
  return 0;
}
