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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.s: H = None
        self.r: J = None
        self.z: B = None
        self.p: D = None
        self.u: B = None
        self.t: D = None
        self.w: I = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: F = None
        self.o: D = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.s: H = None
        self.r: J = None
        self.z: B = None
        self.p: D = None
        self.u: B = None
        self.t: D = None
        self.w: I = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: F = None
        self.o: D = None
        self.r: I = None
        self.txt = txt

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

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