class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: A = None
        self.q: G = None
        self.z: E = None
        self.x: F = None
        self.w: E = None
        self.v: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: F = None
        self.x: H = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.q: B = None
        self.w: C = None
        self.y: F = None
        self.txt = txt

f = A("f")
e = B("e")
m = C("m")
i = D("i")
c = E("c")
g = F("g")
d = G("d")
k = H("k")
l = A("l")

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: F = None
        self.x: H = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.q: B = None
        self.w: C = None
        self.y: F = None
        self.txt = txt

f = A("f")
e = B("e")
m = C("m")
i = D("i")
c = E("c")
g = F("g")
d = G("d")
k = H("k")
l = A("l")

f.t = e
f.p = l
f.v = l
f.q = d
f.z = c
f.w = c
f.x = g
e.o = i
m.z = c
m.u = d
i.z = k
i.r = f
c.w = l
g.s = k
g.t = c
g.y = i
d.y = c
d.w = c
d.t = c
d.q = g
d.x = k
k.t = i
k.o = f
k.q = e
k.w = m
k.y = g
l.t = e
l.p = f
l.v = f
l.q = d
l.z = c
l.w = c
l.x = g
assert m.z.w.t.o.z.txt == "k"