class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: G = None
        self.t: E = None
        self.u: D = None
        self.p: G = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.u: F = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.q: F = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

n = A("n")
l = B("l")
k = C("k")
c = D("c")
a = E("a")
e = F("e")
m = G("m")
b = E("b")
f = A("f")

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.u: F = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.q: F = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

n = A("n")
l = B("l")
k = C("k")
c = D("c")
a = E("a")
e = F("e")
m = G("m")
b = E("b")
f = A("f")

n.z = f
n.o = m
n.p = m
n.t = a
n.u = c
n.y = k
l.w = m
l.s = f
l.u = e
l.q = c
k.z = c
k.x = m
k.q = b
c.z = k
a.z = e
a.t = k
a.s = k
a.u = n
a.x = b
a.v = c
e.u = c
e.q = m
m.t = e
m.q = e
m.z = c
m.w = c
m.r = k
b.z = e
b.t = k
b.s = k
b.u = f
b.x = a
b.v = c
f.z = n
f.o = m
f.p = m
f.t = b
f.u = c
f.y = k
assert k.q.x.z.u.z.x.txt == "m"