#include <bits/stdc++.h>
using namespace std;
int n, sp = 0;
string s;
int main() {
  getline(cin, s);
  for (int i = 0; i <= s.length() - 1; i++) {
    if (s[i + 1] != '/') {
      for (int j = 1; j <= sp; j++) cout << " ";
      cout << s[i] << s[i + 1] << s[i + 2] << endl;
      i += 2;
      sp += 2;
    } else {
      sp -= 2;
      for (int j = 1; j <= sp; j++) cout << " ";
      cout << s[i] << s[i + 1] << s[i + 2] << s[i + 3] << endl;
      i += 3;
    }
  }
  fclose(stdin);
  fclose(stdout);
  return 0;
}
