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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: C = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: C = None
        self.r: B = None
        self.t: C = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: E = None
        self.s: A = None
        self.r: F = None
        self.z: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: C = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: C = None
        self.r: B = None
        self.t: C = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: E = None
        self.s: A = None
        self.r: F = None
        self.z: D = None
        self.w: A = None
        self.txt = txt

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

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

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