class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: D = None
        self.z: J = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.v: I = None
        self.t: I = None
        self.p: J = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: J = None
        self.t: I = None
        self.u: A = None
        self.p: E = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: J = None
        self.y: F = None
        self.x: G = None
        self.v: B = None
        self.w: D = None
        self.s: D = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: G = None
        self.r: D = None
        self.u: F = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: F = None
        self.p: I = None
        self.r: D = None
        self.q: D = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: D = None
        self.z: J = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.v: I = None
        self.t: I = None
        self.p: J = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: J = None
        self.t: I = None
        self.u: A = None
        self.p: E = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: J = None
        self.y: F = None
        self.x: G = None
        self.v: B = None
        self.w: D = None
        self.s: D = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: G = None
        self.r: D = None
        self.u: F = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: F = None
        self.p: I = None
        self.r: D = None
        self.q: D = None
        self.t: C = None
        self.txt = txt

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

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