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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: F = None
        self.z: D = None
        self.r: G = None
        self.x: A = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: F = None
        self.z: D = None
        self.r: G = None
        self.x: A = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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