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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: J = None
        self.x: I = None
        self.p: I = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: I = None
        self.s: F = None
        self.p: E = None
        self.o: B = None
        self.v: C = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: G = None
        self.txt = txt

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

k = A("k")
f = B("f")
h = C("h")
m = D("m")
a = E("a")
e = F("e")
l = G("l")
b = H("b")
d = I("d")
i = J("i")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: J = None
        self.x: I = None
        self.p: I = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: I = None
        self.s: F = None
        self.p: E = None
        self.o: B = None
        self.v: C = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: G = None
        self.txt = txt

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

k = A("k")
f = B("f")
h = C("h")
m = D("m")
a = E("a")
e = F("e")
l = G("l")
b = H("b")
d = I("d")
i = J("i")

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