class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: G = None
        self.s: B = None
        self.o: G = None
        self.v: I = None
        self.z: G = None
        self.y: C = None
        self.q: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: J = None
        self.o: G = None
        self.t: J = None
        self.r: I = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: D = None
        self.v: D = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: J = None
        self.o: G = None
        self.t: J = None
        self.r: I = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: D = None
        self.v: D = None
        self.x: D = None
        self.txt = txt

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

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