class A extends H { protected B b; public B get_b() { return b; } public void set_b(B new_b) { b = new_b; } A() { super(); } public A(B b) { super(); set_b(b); } public static A parse(java.io.InputStream in) throws ParseException { return new Parser(in)._A(); } public static A parse(String s) { try { return parse(new java.io.ByteArrayInputStream(s.getBytes())); } catch (ParseException e) { throw new RuntimeException(e.toString()); } } public static void main(String[] args) throws Exception { A m = parse(System.in); System.out.println("parsed OK"); } void universal_trv0_bef(UniversalVisitor _v_) { super.universal_trv0_bef(_v_); _v_.before(this); } void universal_trv0_aft(UniversalVisitor _v_) { _v_.after(this); super.universal_trv0_aft(_v_); } void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); _v_.before_b(this, b); b.universal_trv0(_v_); _v_.after_b(this, b); super.universal_trv0(_v_); universal_trv0_aft(_v_); } } abstract class B { protected F f; public F get_f() { return f; } public void set_f(F new_f) { f = new_f; } protected J j; public J get_j() { return j; } public void set_j(J new_j) { j = new_j; } B() { super(); } public B(F f, J j) { super(); set_f(f); set_j(j); } void universal_trv0_bef(UniversalVisitor _v_) { _v_.before(this); } void universal_trv0_aft(UniversalVisitor _v_) { _v_.after(this); } void universal_trv0(UniversalVisitor _v_) { _v_.before_f(this, f); f.universal_trv0(_v_); _v_.after_f(this, f); _v_.before_j(this, j); j.universal_trv0(_v_); _v_.after_j(this, j); } } class C extends B implements java.util.Enumeration, Cloneable { protected Nonempty_C first; public Nonempty_C get_first() { return first; } public void set_first(Nonempty_C new_first) { first = new_first; } C() { super(); } public C(F f, J j, Nonempty_C first) { super(f, j); set_first(first); } public static C parse(java.io.InputStream in) throws ParseException { return new Parser(in)._C(); } public static C parse(String s) { try { return parse(new java.io.ByteArrayInputStream(s.getBytes())); } catch (ParseException e) { throw new RuntimeException(e.toString()); } } void universal_trv0_bef(UniversalVisitor _v_) { super.universal_trv0_bef(_v_); _v_.before(this); } void universal_trv0_aft(UniversalVisitor _v_) { _v_.after(this); super.universal_trv0_aft(_v_); } void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); if (first != null) { _v_.before_first(this, first); first.universal_trv0(_v_); _v_.after_first(this, first); } super.universal_trv0(_v_); universal_trv0_aft(_v_); } private Nonempty_C tail; public void addElement(J e) { checktail(); if (tail == null) { first = new Nonempty_C(e,null); tail = first; } else { tail.set_next(new Nonempty_C(e,null)); tail = tail.get_next(); } } public void push(J e) { first = new Nonempty_C(e,first); } public java.util.Enumeration elements() { return new C(first); } public int size() { int i= 0; for (java.util.Enumeration e=elements(); e.hasMoreElements(); i++) e.nextElement(); return i; } public boolean isEmpty() { return (first == null); } public boolean hasMoreElements() { return (first != null); } public Object nextElement() { J car = first.get_it(); first = first.get_next(); return (Object) car; } private void checktail() { if (tail == null && first != null) { tail = first; while (tail.get_next() != null) tail = tail.get_next(); } } public boolean contains(J e) { java.util.Enumeration en = this.elements(); while (en.hasMoreElements()) if (e.equals((J) en.nextElement())) return true; return false; } } class D extends C { protected G g; public G get_g() { return g; } public void set_g(G new_g) { g = new_g; } protected H h; public H get_h() { return h; } public void set_h(H new_h) { h = new_h; } protected A a; public A get_a() { return a; } public void set_a(A new_a) { a = new_a; } D() { super(); } public D(F f, J j, Nonempty_C first, G g, H h, A a) { super(f, j, first); set_g(g); set_h(h); set_a(a); } public static D parse(java.io.InputStream in) throws ParseException { return new Parser(in)._D(); } public static D parse(String s) { try { return parse(new java.io.ByteArrayInputStream(s.getBytes())); } catch (ParseException e) { throw new RuntimeException(e.toString()); } } void universal_trv0_bef(UniversalVisitor _v_) { super.universal_trv0_bef(_v_); _v_.before(this); } void universal_trv0_aft(UniversalVisitor _v_) { _v_.after(this); super.universal_trv0_aft(_v_); } void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); _v_.before_g(this, g); g.universal_trv0(_v_); _v_.after_g(this, g); _v_.before_h(this, h); h.universal_trv0(_v_); _v_.after_h(this, h); _v_.before_a(this, a); a.universal_trv0(_v_); _v_.after_a(this, a); super.universal_trv0(_v_); universal_trv0_aft(_v_); } } class E extends B { protected G g; public G get_g() { return g; } public void set_g(G new_g) { g = new_g; } E() { super(); } public E(F f, J j, G g) { super(f, j); set_g(g); } public static E parse(java.io.InputStream in) throws ParseException { return new Parser(in)._E(); } public static E parse(String s) { try { return parse(new java.io.ByteArrayInputStream(s.getBytes())); } catch (ParseException e) { throw new RuntimeException(e.toString()); } } void universal_trv0_bef(UniversalVisitor _v_) { super.universal_trv0_bef(_v_); _v_.before(this); } void universal_trv0_aft(UniversalVisitor _v_) { _v_.after(this); super.universal_trv0_aft(_v_); } void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); _v_.before_g(this, g); g.universal_trv0(_v_); _v_.after_g(this, g); super.universal_trv0(_v_); universal_trv0_aft(_v_); } } class F extends H { public F() { super(); } public static F parse(java.io.InputStream in) throws ParseException { return new Parser(in)._F(); } public static F parse(String s) { try { return parse(new java.io.ByteArrayInputStream(s.getBytes())); } catch (ParseException e) { throw new RuntimeException(e.toString()); } } void universal_trv0_bef(UniversalVisitor _v_) { super.universal_trv0_bef(_v_); _v_.before(this); } void universal_trv0_aft(UniversalVisitor _v_) { _v_.after(this); super.universal_trv0_aft(_v_); } void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); super.universal_trv0(_v_); universal_trv0_aft(_v_); } } class G { protected boolean booltest; public boolean get_booltest() { return booltest; } public void set_booltest(boolean new_booltest) { booltest = new_booltest; } G() { super(); } public G(boolean booltest) { super(); set_booltest(booltest); } public static G parse(java.io.InputStream in) throws ParseException { return new Parser(in)._G(); } public static G parse(String s) { try { return parse(new java.io.ByteArrayInputStream(s.getBytes())); } catch (ParseException e) { throw new RuntimeException(e.toString()); } } void universal_trv0_bef(UniversalVisitor _v_) { _v_.before(this); } void universal_trv0_aft(UniversalVisitor _v_) { _v_.after(this); } void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); _v_.before_booltest(this, booltest); _v_.after_booltest(this, booltest); universal_trv0_aft(_v_); } } abstract class H { public H() { super(); } void universal_trv0_bef(UniversalVisitor _v_) { _v_.before(this); } void universal_trv0_aft(UniversalVisitor _v_) { _v_.after(this); } void universal_trv0(UniversalVisitor _v_) { } } class J { public J() { super(); } public static J parse(java.io.InputStream in) throws ParseException { return new Parser(in)._J(); } public static J parse(String s) { try { return parse(new java.io.ByteArrayInputStream(s.getBytes())); } catch (ParseException e) { throw new RuntimeException(e.toString()); } } void universal_trv0_bef(UniversalVisitor _v_) { _v_.before(this); } void universal_trv0_aft(UniversalVisitor _v_) { _v_.after(this); } void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); universal_trv0_aft(_v_); } } class Nonempty_C { protected J it; public J get_it() { return it; } public void set_it(J new_it) { it = new_it; } protected Nonempty_C next; public Nonempty_C get_next() { return next; } public void set_next(Nonempty_C new_next) { next = new_next; } }