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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: H = None
        self.v: F = None
        self.w: G = None
        self.u: G = None
        self.r: J = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: C = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: F = None
        self.x: B = None
        self.t: J = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: H = None
        self.v: F = None
        self.w: G = None
        self.u: G = None
        self.r: J = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: C = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: F = None
        self.x: B = None
        self.t: J = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

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