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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: E = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: E = None
        self.txt = txt

l = A("l")
c = B("c")
j = C("j")
b = D("b")
n = E("n")
f = D("f")
i = A("i")
a = E("a")
e = A("e")
h = B("h")

l.x = b
l.p = c
l.q = j
l.o = a
c.t = j
c.r = b
c.x = h
c.v = l
j.u = n
j.r = n
j.q = l
j.v = h
b.v = e
b.t = j
n.u = c
n.p = a
f.v = i
f.t = j
i.x = f
i.p = h
i.q = j
i.o = n
a.u = c
a.p = n
e.x = f
e.p = h
e.q = j
e.o = a
h.t = j
h.r = b
h.x = c
h.v = i
assert a.u.v.p.r.t.v.t.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: B = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: E = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: E = None
        self.txt = txt

l = A("l")
c = B("c")
j = C("j")
b = D("b")
n = E("n")
f = D("f")
i = A("i")
a = E("a")
e = A("e")
h = B("h")

l.x = b
l.p = c
l.q = j
l.o = a
c.t = j
c.r = b
c.x = h
c.v = l
j.u = n
j.r = n
j.q = l
j.v = h
b.v = e
b.t = j
n.u = c
n.p = a
f.v = i
f.t = j
i.x = f
i.p = h
i.q = j
i.o = n
a.u = c
a.p = n
e.x = f
e.p = h
e.q = j
e.o = a
h.t = j
h.r = b
h.x = c
h.v = i
assert a.u.v.p.r.t.v.t.u.u.txt == "c"