#include <bits/stdc++.h>
using namespace std;
template <class T>
struct vect {
 private:
  T *memory = new T[0];
  unsigned int length;
  unsigned int sz;

 public:
  vect() {
    length = 0;
    sz = 0;
  }
  inline void incsize(const int len) {
    T *temp = new T[len];
    length = len;
    for (int i = 0; i < sz; ++i) temp[i] = memory[i];
    swap(temp, memory);
  }
  inline void resize(const unsigned int v) {
    sz = v;
    if (v > length) incsize((1 << v) + 1);
  }
  inline void push_back(const T a) {
    const unsigned int len = length;
    if (length == sz) incsize((length << 1) + 1);
    memory[sz++] = a;
  }
  T &operator[](const unsigned int i) { return memory[i]; }
  unsigned int size() { return sz; }
};
map<string, set<string> > v;
map<set<string>, vect<string> > s1;
int main() {
  ::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    s = s.substr(7);
    string t;
    for (int i = 0; i < s.length(); ++i)
      if (s[i] == '/') t = s.substr(i), s = s.substr(0, i);
    v[s].insert(t);
  }
  for (auto x : v) s1[x.second].push_back(x.first);
  int cnt = 0;
  for (auto x : s1)
    if (x.second.size() > 1) ++cnt;
  cout << cnt << endl;
  for (auto x : s1)
    if (x.second.size() > 1) {
      for (int i = 0; i < x.second.size(); ++i)
        cout << "http://" << x.second[i] << " ";
      cout << endl;
    }
  return 0;
}
