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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: A = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: E = None
        self.o: C = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.t: B = None
        self.u: B = None
        self.y: B = None
        self.txt = txt

i = A("i")
c = B("c")
a = C("a")
m = D("m")
h = E("h")
b = B("b")
k = A("k")
j = E("j")

i.x = j
i.r = k
i.u = k
i.w = k
i.v = h
c.y = k
c.s = i
c.r = b
c.p = b
a.v = j
a.o = b
a.r = k
a.p = k
a.q = m
m.v = b
m.u = h
m.q = h
m.o = a
m.z = j
h.q = a
h.x = i
h.t = b
h.y = b
h.u = c
b.y = i
b.s = k
b.r = c
b.p = c
k.x = j
k.v = j
k.r = i
k.u = i
k.w = i
j.q = a
j.x = i
j.t = b
j.y = b
j.u = c
assert b.s.r.x.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: A = None
        self.u: A = None
        self.v: E = None
        self.w: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: A = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: E = None
        self.o: C = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.t: B = None
        self.u: B = None
        self.y: B = None
        self.txt = txt

i = A("i")
c = B("c")
a = C("a")
m = D("m")
h = E("h")
b = B("b")
k = A("k")
j = E("j")

i.x = j
i.r = k
i.u = k
i.w = k
i.v = h
c.y = k
c.s = i
c.r = b
c.p = b
a.v = j
a.o = b
a.r = k
a.p = k
a.q = m
m.v = b
m.u = h
m.q = h
m.o = a
m.z = j
h.q = a
h.x = i
h.t = b
h.y = b
h.u = c
b.y = i
b.s = k
b.r = c
b.p = c
k.x = j
k.v = j
k.r = i
k.u = i
k.w = i
j.q = a
j.x = i
j.t = b
j.y = b
j.u = c
assert b.s.r.x.u.r.txt == "b"