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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: E = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: E = None
        self.o: D = None
        self.p: J = None
        self.r: A = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: I = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: E = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: E = None
        self.o: D = None
        self.p: J = None
        self.r: A = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: I = None
        self.r: F = None
        self.txt = txt

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

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