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

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

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: I = None
        self.z: G = None
        self.v: I = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.x: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: J = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: I = None
        self.z: G = None
        self.v: I = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.x: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: J = None
        self.y: E = None
        self.txt = txt

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

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

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