class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: B = None
        self.r: B = None
        self.t: B = None
        self.s: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: E = None
        self.t: E = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: B = None
        self.x: C = None
        self.q: C = None
        self.txt = txt

j = A("j")
e = B("e")
h = C("h")
d = D("d")
n = E("n")
c = A("c")
l = C("l")
g = A("g")
b = E("b")

j.q = d
j.o = e
j.r = e
j.t = e
j.s = g
e.r = h
e.w = n
e.p = n
e.t = b
e.v = d
h.t = l
h.u = c
d.v = l
d.s = j
n.o = b
n.r = e
n.x = l
n.q = h
c.q = d
c.o = e
c.r = e
c.t = e
c.s = j
l.t = h
l.u = g
g.q = d
g.o = e
g.r = e
g.t = e
g.s = j
b.o = n
b.r = e
b.x = l
b.q = l
assert l.t.u.t.p.o.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: B = None
        self.r: B = None
        self.t: B = None
        self.s: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: E = None
        self.t: E = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: B = None
        self.x: C = None
        self.q: C = None
        self.txt = txt

j = A("j")
e = B("e")
h = C("h")
d = D("d")
n = E("n")
c = A("c")
l = C("l")
g = A("g")
b = E("b")

j.q = d
j.o = e
j.r = e
j.t = e
j.s = g
e.r = h
e.w = n
e.p = n
e.t = b
e.v = d
h.t = l
h.u = c
d.v = l
d.s = j
n.o = b
n.r = e
n.x = l
n.q = h
c.q = d
c.o = e
c.r = e
c.t = e
c.s = j
l.t = h
l.u = g
g.q = d
g.o = e
g.r = e
g.t = e
g.s = j
b.o = n
b.r = e
b.x = l
b.q = l
assert l.t.u.t.p.o.r.t.txt == "b"