#include <bits/stdc++.h>
using namespace std;
string s;
char a[100000];
int x = 0, k = 0;
bool bo = false, u[100000];
int main() {
  memset(u, false, sizeof(u));
  getline(cin, s);
  for (int i = 0; i < s.size(); i++)
    if (s[i] >= 'a' && s[i] <= 'z') {
      if (s[i - 1] == '/') u[x] = true;
      a[x++] = s[i];
    }
  for (int i = 0; i < x; i++) {
    if (u[i] == false && !i)
      printf("<%c>", a[i]), k++;
    else if (u[i] == false) {
      printf("\n");
      for (int j = 0; j < k * 2; j++) printf(" ");
      printf("<%c>", a[i]), k++;
    } else if (u[i] == true) {
      printf("\n");
      k--;
      for (int j = 0; j < k * 2; j++) printf(" ");
      printf("</%c>", a[i]);
    }
  }
  return 0;
}
