class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: J = None
        self.t: C = None
        self.p: E = None
        self.u: H = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: F = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.t: G = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: I = None
        self.z: H = None
        self.t: E = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: C = None
        self.x: D = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: J = None
        self.t: C = None
        self.p: E = None
        self.u: H = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: F = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.t: G = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: I = None
        self.z: H = None
        self.t: E = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: C = None
        self.x: D = None
        self.t: C = None
        self.txt = txt

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

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

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