#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int space = 0;
void dx(char a) {
  space--;
  for (int i = 0; i < space; i++) {
    cout << "  ";
  }
  cout << "</" << a << '>' << endl;
}
void bdx(char a) {
  for (int i = 0; i < space; i++) {
    cout << "  ";
  }
  cout << '<' << a << '>' << endl;
  space++;
}
int main() {
  string a;
  cin >> a;
  int k = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] <= 'z' && a[i] >= 'a') {
      if (a[i - 1] == '/') {
        dx(a[i]);
      } else
        bdx(a[i]);
    }
  }
  return 0;
}
