#include <bits/stdc++.h>
using namespace std;
mt19937 gen(chrono::steady_clock::now().time_since_epoch().count());
template <typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& p) {
  out << p.first << " " << p.second;
  return out;
}
void solve() {
  string str;
  cin >> str;
  int cnt = -1;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '<') {
      if (str[i + 1] != '/') cnt++;
      for (int j = 0; j < cnt * 2; j++) cout << ' ';
      cout << str[i];
    } else if (str[i] == '/') {
      cout << str[i];
      cnt--;
    } else if (str[i] == '>') {
      cout << str[i];
      cout << '\n';
    } else {
      cout << str[i];
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  for (int cas = 1; cas <= t; cas++) {
    solve();
  }
  return 0;
}
