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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: E = None
        self.txt = txt

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

k = A("k")
h = B("h")
b = C("b")
i = D("i")
m = E("m")
j = F("j")
a = G("a")
d = E("d")

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: E = None
        self.txt = txt

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

k = A("k")
h = B("h")
b = C("b")
i = D("i")
m = E("m")
j = F("j")
a = G("a")
d = E("d")

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