class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.r: F = None
        self.u: H = None
        self.p: J = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: J = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: F = None
        self.p: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: I = None
        self.w: D = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: J = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: F = None
        self.p: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: I = None
        self.w: D = None
        self.z: D = None
        self.txt = txt

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

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