class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: A = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: A = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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