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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: A = None
        self.x: C = None
        self.r: B = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: C = None
        self.y: C = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: A = None
        self.x: C = None
        self.r: B = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: C = None
        self.y: C = None
        self.p: E = None
        self.txt = txt

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

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