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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.r: A = None
        self.t: D = None
        self.q: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.s: E = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: E = None
        self.v: A = None
        self.p: F = None
        self.o: G = None
        self.s: A = None
        self.x: D = None
        self.r: B = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.r: A = None
        self.t: D = None
        self.q: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.s: E = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: E = None
        self.v: A = None
        self.p: F = None
        self.o: G = None
        self.s: A = None
        self.x: D = None
        self.r: B = None
        self.q: H = None
        self.txt = txt

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

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