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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: C = None
        self.s: E = None
        self.y: I = None
        self.w: B = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: D = None
        self.w: H = None
        self.s: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: I = None
        self.o: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: C = None
        self.s: E = None
        self.y: I = None
        self.w: B = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: D = None
        self.w: H = None
        self.s: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: I = None
        self.o: F = None
        self.txt = txt

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

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

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