#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:200000000")
using namespace std;
string s;
int col = -2;
int main() {
  getline(cin, s);
  int n = s.size();
  for (int i = 0; i < n; i++, printf("\n"))
    if (s[i + 1] != '/') {
      if (s[i - 3] != '/') col += 2;
      for (int ix = 0; ix < col; ix++) putchar(' ');
      printf("<%c>", s[i + 1]);
      i += 2;
    } else {
      if (s[i - 3] == '/') col -= 2;
      for (int ix = 0; ix < col; ix++) putchar(' ');
      printf("</%c>", s[i + 2]);
      i += 3;
    }
  return 0;
}
