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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.y: B = None
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: H = None
        self.txt = txt

k = A("k")
m = B("m")
c = C("c")
j = D("j")
h = E("h")
f = F("f")
d = G("d")
n = H("n")
a = I("a")
l = F("l")

k.t = n
m.q = a
m.x = a
m.t = d
c.v = a
c.q = j
c.w = k
c.o = k
c.z = h
j.t = m
h.w = n
f.v = m
f.y = m
f.u = j
f.t = c
d.z = j
n.t = l
n.z = l
n.y = m
n.p = m
n.u = c
n.v = a
n.x = a
n.q = d
a.o = k
a.r = n
l.v = m
l.y = m
l.u = j
l.t = c
assert m.t.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.y: B = None
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: H = None
        self.txt = txt

k = A("k")
m = B("m")
c = C("c")
j = D("j")
h = E("h")
f = F("f")
d = G("d")
n = H("n")
a = I("a")
l = F("l")

k.t = n
m.q = a
m.x = a
m.t = d
c.v = a
c.q = j
c.w = k
c.o = k
c.z = h
j.t = m
h.w = n
f.v = m
f.y = m
f.u = j
f.t = c
d.z = j
n.t = l
n.z = l
n.y = m
n.p = m
n.u = c
n.v = a
n.x = a
n.q = d
a.o = k
a.r = n
l.v = m
l.y = m
l.u = j
l.t = c
assert m.t.z.t.txt == "m"