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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.o: F = None
        self.txt = txt

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

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

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