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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.w: D = None
        self.u: F = None
        self.s: G = None
        self.v: F = None
        self.y: I = None
        self.q: B = None
        self.z: G = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: C = None
        self.u: I = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.w: D = None
        self.u: F = None
        self.s: G = None
        self.v: F = None
        self.y: I = None
        self.q: B = None
        self.z: G = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: C = None
        self.u: I = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

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

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

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