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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.v: E = None
        self.z: B = None
        self.y: F = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.v: E = None
        self.z: B = None
        self.y: F = None
        self.p: B = None
        self.txt = txt

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

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