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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: G = None
        self.x: A = None
        self.w: F = None
        self.v: G = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: G = None
        self.x: A = None
        self.w: F = None
        self.v: G = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

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

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

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