class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: H = None
        self.u: F = None
        self.s: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.q: 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.u: B = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.q: 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.u: B = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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