#include <bits/stdc++.h>
using namespace std;
long long int find(vector<long long int> &p, long long int i) {
  if (p[i] == -1) return i;
  return find(p, p[i]);
}
void solve() {
  string st;
  cin >> st;
  long long int c = 0;
  for (long long int i = 0; i < st.size(); i++) {
    if (st[i] == '>' or st[i] == '<') {
      continue;
    }
    if (st[i] == '/') {
      c--;
      for (long long int j = 0; j < 2 * c; j++) {
        cout << " ";
      }
      cout << "</" << st[i + 1] << ">" << endl;
    } else if (st[i - 1] != '/') {
      for (long long int j = 0; j < 2 * c; j++) {
        cout << " ";
      }
      cout << "<" << st[i] << ">" << endl;
      c++;
    }
  }
}
int main() {
  { solve(); }
  return 0;
}
