#include <bits/stdc++.h>
using namespace std;
const long long int md = 1e9 + 7;
const long long int M1 = 998244353;
long long int mod(long long int n) { return ((n % md) + md) % md; }
const long long int Mod = 1e9 + 7;
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = mod(res * x);
    x = mod(x * x);
    y = mod(y >> 1);
  }
  return mod(res);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int nst = 0;
  int i = 1;
  vector<int> v;
  while (i < s.size()) {
    v.push_back(nst);
    if (s[i] == '/') {
      i++;
      nst--;
      for (int j = 0; j < nst; j++) {
        cout << "  ";
      }
      cout << "</" << s[i] << ">\n";
    } else {
      for (int j = 0; j < nst; j++) {
        cout << "  ";
      }
      cout << "<" << s[i] << ">\n";
      nst++;
    }
    i += 3;
  }
}
