class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: E = None
        self.s: F = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.z: E = None
        self.q: B = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: B = None
        self.q: E = None
        self.p: E = None
        self.s: B = None
        self.y: B = None
        self.txt = txt

i = A("i")
h = B("h")
n = C("n")
d = D("d")
e = E("e")
l = F("l")
c = D("c")
m = B("m")

i.o = n
i.z = e
i.s = l
i.r = d
h.t = e
h.z = e
h.r = n
h.q = m
h.w = i
n.p = l
n.o = i
d.t = e
d.y = e
d.p = c
d.w = c
d.u = n
d.r = l
e.x = d
e.r = m
e.o = n
l.r = m
l.z = m
l.y = m
l.q = e
l.p = e
l.s = h
c.t = e
c.y = e
c.p = d
c.w = d
c.u = n
c.r = l
m.t = e
m.z = e
m.r = n
m.q = h
m.w = i
assert c.w.t.x.r.s.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: E = None
        self.s: F = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.z: E = None
        self.q: B = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: B = None
        self.q: E = None
        self.p: E = None
        self.s: B = None
        self.y: B = None
        self.txt = txt

i = A("i")
h = B("h")
n = C("n")
d = D("d")
e = E("e")
l = F("l")
c = D("c")
m = B("m")

i.o = n
i.z = e
i.s = l
i.r = d
h.t = e
h.z = e
h.r = n
h.q = m
h.w = i
n.p = l
n.o = i
d.t = e
d.y = e
d.p = c
d.w = c
d.u = n
d.r = l
e.x = d
e.r = m
e.o = n
l.r = m
l.z = m
l.y = m
l.q = e
l.p = e
l.s = h
c.t = e
c.y = e
c.p = d
c.w = d
c.u = n
c.r = l
m.t = e
m.z = e
m.r = n
m.q = h
m.w = i
assert c.w.t.x.r.s.r.o.txt == "i"