class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.q: G = None
        self.u: B = None
        self.y: H = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

h = A("h")
g = B("g")
c = C("c")
k = D("k")
f = E("f")
a = F("a")
i = G("i")
m = H("m")

h.z = c
h.x = g
h.u = g
h.q = i
h.v = i
h.y = m
g.v = f
g.p = h
c.q = i
c.s = a
k.r = i
k.s = h
k.o = c
f.p = c
f.v = i
a.y = c
a.p = i
a.o = i
a.q = h
a.z = h
a.v = h
a.t = h
i.x = g
m.p = h
assert m.p.z.s.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.q: G = None
        self.u: B = None
        self.y: H = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

h = A("h")
g = B("g")
c = C("c")
k = D("k")
f = E("f")
a = F("a")
i = G("i")
m = H("m")

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