Problem: There are some websites that are accessible through several different addresses. For example, for a long time Codeforces was accessible with two hostnames codeforces.com and codeforces.ru.

You are given a list of page addresses being queried. For simplicity we consider all addresses to have the form http://<hostname>[/<path>], where:

  * <hostname> — server name (consists of words and maybe some dots separating them), 
  * /<path> — optional part, where <path> consists of words separated by slashes. 



We consider two <hostname> to correspond to one website if for each query to the first <hostname> there will be exactly the same query to the second one and vice versa — for each query to the second <hostname> there will be the same query to the first one. Take a look at the samples for further clarifications.

Your goal is to determine the groups of server names that correspond to one website. Ignore groups consisting of the only server name.

Please note, that according to the above definition queries http://<hostname> and http://<hostname>/ are different.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of page queries. Then follow n lines each containing exactly one address. Each address is of the form http://<hostname>[/<path>], where:

  * <hostname> consists of lowercase English letters and dots, there are no two consecutive dots, <hostname> doesn't start or finish with a dot. The length of <hostname> is positive and doesn't exceed 20. 
  * <path> consists of lowercase English letters, dots and slashes. There are no two consecutive slashes, <path> doesn't start with a slash and its length doesn't exceed 20. 



Addresses are not guaranteed to be distinct.

Output

First print k — the number of groups of server names that correspond to one website. You should count only groups of size greater than one.

Next k lines should contain the description of groups, one group per line. For each group print all server names separated by a single space. You are allowed to print both groups and names inside any group in arbitrary order.

Examples

Input

10
http://abacaba.ru/test
http://abacaba.ru/
http://abacaba.com
http://abacaba.com/test
http://abacaba.de/
http://abacaba.ru/test
http://abacaba.de/test
http://abacaba.com/
http://abacaba.com/t
http://abacaba.com/test


Output

1
http://abacaba.de http://abacaba.ru 


Input

14
http://c
http://ccc.bbbb/aba..b
http://cba.com
http://a.c/aba..b/a
http://abc/
http://a.c/
http://ccc.bbbb
http://ab.ac.bc.aa/
http://a.a.a/
http://ccc.bbbb/
http://cba.com/
http://cba.com/aba..b
http://a.a.a/aba..b/a
http://abc/aba..b/a


Output

2
http://cba.com http://ccc.bbbb 
http://a.a.a http://a.c http://abc 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long linf = 10000000000000043;
const int inf = 1000000043;
void pause(bool a = true) {}
template <class T>
inline const T sqr(const T &x) {
  return x * x;
}
template <class T>
inline T dist(pair<T, T> a, pair<T, T> b) {
  return sqrt(sqr(a.first - b.first) + sqr(a.second - b.second));
}
template <class T>
inline T prod(pair<T, T> a, pair<T, T> b, pair<T, T> c = make_pair(0, 0)) {
  return (a.first - c.first) * (b.second - c.second) -
         (a.second - c.second) * (b.first - c.first);
}
template <class T>
inline T prodv(pair<T, T> a, pair<T, T> b, pair<T, T> c = make_pair(0, 0)) {
  return (a.first - c.first) * (b.first - c.first) +
         (a.second - c.second) * (b.second - c.second);
}
template <class T>
inline bool intriangle(pair<T, T> a, pair<T, T> b, pair<T, T> c, pair<T, T> d) {
  return (abs(prod(a, b, c)) ==
          abs(prod(a, b, d)) + abs(prod(a, c, d)) + abs(prod(b, c, d)));
}
template <class T>
inline int sg(T a) {
  return (a < 0 ? -1 : a ? 1 : 0);
}
long long rng(long long a, long long b) {
  return (((((long long)rand()) << 16) + rand()) % (b - a + 1)) + a;
}
bool inConvPoly(const vector<pair<long long, long long>> &a,
                pair<long long, long long> b) {
  long long l = 1;
  long long r = a.size() - 1;
  if (sg(prod(a[l], b, a[0])) * sg(prod(a[r], b, a[0])) >= 0) return false;
  if (intriangle(a[l], a[r], a[0], b)) return true;
  while (l != r - 1)
    (prod(a[(l + r) / 2], b, a[0]) < 0) ? l = (l + r) / 2 : r = (l + r) / 2;
  return sg(prod(b, a[r], a[l])) * sg(prod(b, a[0], a[l])) < 0;
}
template <class T>
T mex(vector<T> a) {
  set<T> b(a.begin(), a.end());
  for (int i = 0;; ++i)
    if (!b.count(i)) return i;
}
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long popcnt(long long mask) {
  long long cnt = 0;
  while (mask) cnt += mask % 2, mask /= 2;
  return cnt;
}
unsigned long long powi(unsigned long long a, unsigned long long b,
                        long long mod = 1000000007) {
  if (b < 2) return b ? a : 1;
  return (powi((a * a) % mod, b / 2, mod) * (b % 2 ? a : 1LL)) % mod;
}
bool isn(char c) { return ('0' <= c && c <= '9'); }
template <class T>
bool read(T &out) {
  int c = getchar(), sign = 1;
  T num = 0;
  for (; !isn(c) && c != '-'; c = getchar())
    if (c == EOF) return false;
  if (c == '-') {
    sign = -1;
    c = getchar();
  }
  if (c == EOF) return false;
  for (; isn(c); c = getchar()) num = num * 10 + c - '0';
  out = sign * num;
  return true;
}
long long time_limit = 1000000;
long long start = clock();
bool time_break() {
  int g = clock();
  return (clock() - start > time_limit * 0.9);
}
long long fact(long long n, long long mod = linf) {
  long long g = 1;
  for (int i = 0; i < (n); i++) g *= (i + 1);
  return g;
}
void init(long long tl = 1000000) {
  ios::sync_with_stdio(false);
  srand(time(0));
  time_limit = tl;
}
template <class T>
bool maxz(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool minz(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool maxze(T &a, T b) {
  if (a <= b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool minze(T &a, T b) {
  if (a >= b) {
    a = b;
    return true;
  }
  return false;
}
long long mod7 = 1000000007;
long long mod9 = 1000000009;
bool isprime(long long n) {
  if (n < 2) return 0;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
long long randLL() {
  return (((long long)rand()) << 47) + (((long long)rand()) << 31) +
         (((long long)rand()) << 15) + (((long long)rand()) >> 1);
}
bool isprimeL(long long n, int it = 50) {
  if (n < 2) return 0;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (int i = 0; i < (it); i++) {
    long long x = randLL() % (n - 1) + 1;
    if (gcd(x, n) != 1) return 0;
    if (powi(x, n - 1, n) != 1) return 0;
  }
  return 1;
}
string host(string s) {
  int j = 0;
  int h = 3;
  for (; j < s.length() && h; j++, h -= s[j] == '/')
    ;
  return s.substr(0, j);
}
string path(string s) {
  int j = 0;
  int h = 3;
  for (; j < s.length() && h; j++, h -= s[j] == '/')
    ;
  return s.substr(j);
}
int main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  map<string, long long> id;
  vector<set<string>> hs;
  string divider = "#$%^&#@$%ab330";
  for (int i = 0; i < (n); i++) {
    string s;
    cin >> s;
    string hostname = host(s);
    if (id.find(hostname) == id.end()) {
      id[hostname] = hs.size();
      hs.push_back(set<string>());
    }
    hs[id[hostname]].insert(path(s));
  }
  map<string, vector<string>> ans;
  for (auto &p : id) {
    string h = "";
    for (auto ss : hs[p.second]) h += divider + ss;
    if (ans.find(h) == ans.end()) ans[h] = vector<string>();
    ans[h].push_back(p.first);
  }
  long long cnt = 0;
  for (auto &p : ans) cnt += p.second.size() > 1;
  cout << cnt << endl;
  for (auto &p : ans)
    if (p.second.size() > 1) {
      for (int i = 0; i < (p.second.size() - 1); i++)
        cout << p.second[i] << " ";
      cout << p.second[p.second.size() - 1] << endl;
    }
  pause(1);
  return 0;
}