class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: J = None
        self.y: B = None
        self.u: B = None
        self.s: B = None
        self.r: J = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.z: H = None
        self.s: B = None
        self.x: G = None
        self.q: D = None
        self.p: B = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: E = None
        self.u: D = None
        self.s: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.x: F = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.v: G = None
        self.r: A = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.t: D = None
        self.y: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: J = None
        self.y: B = None
        self.u: B = None
        self.s: B = None
        self.r: J = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.z: H = None
        self.s: B = None
        self.x: G = None
        self.q: D = None
        self.p: B = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: E = None
        self.u: D = None
        self.s: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.x: F = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.v: G = None
        self.r: A = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.t: D = None
        self.y: H = None
        self.txt = txt

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

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