class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.q: A = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.p: A = None
        self.r: A = None
        self.v: C = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: F = None
        self.p: E = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.p: A = None
        self.r: A = None
        self.v: C = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: F = None
        self.p: E = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

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

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