class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.s: F = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

k = A("k")
m = B("m")
j = C("j")
h = D("h")
g = E("g")
i = F("i")
c = G("c")
l = H("l")
a = I("a")
n = J("n")

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

k = A("k")
m = B("m")
j = C("j")
h = D("h")
g = E("g")
i = F("i")
c = G("c")
l = H("l")
a = I("a")
n = J("n")

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