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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: E = None
        self.r: A = None
        self.s: B = None
        self.u: E = None
        self.w: D = None
        self.t: F = None
        self.o: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: F = None
        self.t: H = None
        self.q: A = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: A = None
        self.w: H = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.o: D = None
        self.s: F = None
        self.t: D = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: C = None
        self.u: D = None
        self.r: A = None
        self.w: C = None
        self.p: G = None
        self.y: F = None
        self.v: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: E = None
        self.r: A = None
        self.s: B = None
        self.u: E = None
        self.w: D = None
        self.t: F = None
        self.o: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: F = None
        self.t: H = None
        self.q: A = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: A = None
        self.w: H = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.o: D = None
        self.s: F = None
        self.t: D = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: C = None
        self.u: D = None
        self.r: A = None
        self.w: C = None
        self.p: G = None
        self.y: F = None
        self.v: E = None
        self.txt = txt

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

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