#include <bits/stdc++.h>
using namespace std;
string str;
void solve() {
  cin >> str;
  int h = 0;
  int i = 0;
  while (i < str.size()) {
    if (str[i] == '<' && str[i + 2] == '>') {
      for (int j = (0); j < (h); j++) cout << " ";
      cout << str.substr(i, 3) << endl;
      h += 2;
      i += 3;
      continue;
    }
    if (str[i] == '<' && str[i + 3] == '>') {
      h -= 2;
      for (int j = (0); j < (h); j++) cout << " ";
      cout << str.substr(i, 4) << endl;
      i += 4;
    }
  }
}
int main(int argc, char *argv[]) {
  solve();
  return 0;
}
