#include <bits/stdc++.h>
using namespace std;
void print_str(int noBlanks, int start, string s) {
  if (start) cout << endl;
  if (noBlanks) cout << setw(noBlanks) << " ";
  cout << s;
}
int main() {
  string sXmlText;
  int stacksize = 0;
  int i = 0;
  int maxsize = 0;
  int start = 0;
  int end = 0;
  int closingTag = 0;
  int blankCount = 0;
  getline(cin, sXmlText);
  maxsize = sXmlText.size();
  while (i < maxsize) {
    if (sXmlText[i] != '<') {
      cout << "Error Buddy";
      return -1;
    }
    start = i;
    ++i;
    if (sXmlText[i] == '/') {
      closingTag = 1;
      ++i;
    } else {
      closingTag = 0;
    }
    while (sXmlText[i] != '>') {
      ++i;
    }
    end = i;
    if (closingTag == 0) {
      blankCount = 2 * stacksize;
      ++stacksize;
    } else {
      --stacksize;
      blankCount = 2 * stacksize;
    }
    print_str(blankCount, start, sXmlText.substr(start, end - start + 1));
    ++i;
  }
  return 0;
}
