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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: H = None
        self.t: E = None
        self.q: D = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.t: C = None
        self.y: H = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: H = None
        self.t: E = None
        self.q: D = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.t: C = None
        self.y: H = None
        self.u: C = None
        self.txt = txt

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

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