#include <bits/stdc++.h>
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::string s;
  std::cin >> s;
  std::string_view view = s;
  size_t n = 0;
  while (!view.empty()) {
    const size_t id = view.find('>') + 1;
    const auto tag = view.substr(0, id);
    view.remove_prefix(id);
    if (tag[1] == '/') {
      n -= 2;
    }
    std::cout << std::string(n, ' ') << tag << '\n';
    if (tag[1] != '/') {
      n += 2;
    }
  }
}
