#include <bits/stdc++.h>
using namespace std;
char buf[1024];
int main() {
  cin >> buf;
  int depth = 0;
  for (int i = 0, j; buf[i]; i = j + 1) {
    for (j = i; buf[j] != '>'; j++)
      ;
    if (buf[i + 1] == '/') depth--;
    for (int k = 0; k < 2 * depth; k++) cout << ' ';
    for (int k = i; k <= j; k++) cout << buf[k];
    puts("");
    if (buf[i + 1] != '/') depth++;
  }
  return 0;
}
