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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: D = None
        self.y: F = None
        self.r: F = None
        self.z: B = None
        self.p: J = None
        self.v: F = None
        self.w: F = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.u: I = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: B = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: E = None
        self.w: E = None
        self.z: G = None
        self.o: G = None
        self.q: D = None
        self.y: B = None
        self.t: E = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: D = None
        self.y: F = None
        self.r: F = None
        self.z: B = None
        self.p: J = None
        self.v: F = None
        self.w: F = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.u: I = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: B = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: E = None
        self.w: E = None
        self.z: G = None
        self.o: G = None
        self.q: D = None
        self.y: B = None
        self.t: E = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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