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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: H = None
        self.y: E = None
        self.z: E = None
        self.q: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: I = None
        self.u: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.z: F = None
        self.s: E = None
        self.y: I = None
        self.o: F = None
        self.u: F = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: B = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.u: H = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: H = None
        self.y: E = None
        self.z: E = None
        self.q: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: I = None
        self.u: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.z: F = None
        self.s: E = None
        self.y: I = None
        self.o: F = None
        self.u: F = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: B = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.u: H = None
        self.q: H = None
        self.txt = txt

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

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