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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: A = None
        self.t: B = None
        self.r: B = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: E = None
        self.w: C = None
        self.y: D = None
        self.z: J = None
        self.v: F = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.o: C = None
        self.z: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: A = None
        self.t: B = None
        self.r: B = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: E = None
        self.w: C = None
        self.y: D = None
        self.z: J = None
        self.v: F = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.o: C = None
        self.z: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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