#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double pi = acos(-1.0);
const int inf = 1000000000;
int main(void) {
  string s, p;
  cin >> s;
  int len = s.size();
  int deep = 0;
  int i, j;
  for (i = j = 0; i < len && j < len;) {
    while (s[j] != '>') j++;
    p = s.substr(i, j - i + 1);
    i = ++j;
    if (p[1] != '/') {
      for (int k = 0; k < (2 * deep); ++k) putchar(' ');
      cout << p << endl;
      deep++;
    } else {
      deep--;
      for (int k = 0; k < (2 * deep); ++k) putchar(' ');
      cout << p << endl;
    }
  }
  return 0;
}
