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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: C = None
        self.v: B = None
        self.z: D = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

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

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

i.u = a
i.x = a
i.v = a
i.t = f
i.w = j
b.u = c
b.z = c
b.x = j
b.w = j
b.v = d
j.u = a
j.s = c
j.p = i
c.p = d
c.r = d
c.u = n
c.y = j
a.p = c
a.z = j
a.q = f
f.u = a
f.v = a
f.t = i
f.w = j
f.x = l
n.u = c
n.z = c
n.x = j
n.w = j
n.v = d
d.u = c
d.z = c
d.x = j
d.w = j
d.v = n
l.p = c
l.z = j
l.q = f
assert b.u.u.v.x.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: A = None
        self.w: C = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: C = None
        self.v: B = None
        self.z: D = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

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

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

i.u = a
i.x = a
i.v = a
i.t = f
i.w = j
b.u = c
b.z = c
b.x = j
b.w = j
b.v = d
j.u = a
j.s = c
j.p = i
c.p = d
c.r = d
c.u = n
c.y = j
a.p = c
a.z = j
a.q = f
f.u = a
f.v = a
f.t = i
f.w = j
f.x = l
n.u = c
n.z = c
n.x = j
n.w = j
n.v = d
d.u = c
d.z = c
d.x = j
d.w = j
d.v = n
l.p = c
l.z = j
l.q = f
assert b.u.u.v.x.u.p.txt == "c"