class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: H = None
        self.x: E = None
        self.u: G = None
        self.w: G = None
        self.y: G = None
        self.s: I = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: I = None
        self.u: D = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: F = None
        self.o: I = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: I = None
        self.u: D = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: F = None
        self.o: I = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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

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