class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: F = None
        self.z: D = None
        self.y: F = None
        self.p: E = None
        self.o: G = None
        self.u: J = None
        self.q: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: I = None
        self.x: B = None
        self.q: J = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: I = None
        self.x: B = None
        self.q: J = None
        self.txt = txt

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

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

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

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

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