class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: G = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.s: J = None
        self.z: D = None
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.t: I = None
        self.y: J = None
        self.s: F = None
        self.z: I = None
        self.v: J = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: C = None
        self.w: A = None
        self.s: I = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: J = None
        self.r: C = None
        self.v: J = None
        self.o: J = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: B = None
        self.p: J = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.s: J = None
        self.z: D = None
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.t: I = None
        self.y: J = None
        self.s: F = None
        self.z: I = None
        self.v: J = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: C = None
        self.w: A = None
        self.s: I = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: J = None
        self.r: C = None
        self.v: J = None
        self.o: J = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: B = None
        self.p: J = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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