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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: F = None
        self.p: J = None
        self.t: E = None
        self.s: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: F = None
        self.p: J = None
        self.t: E = None
        self.s: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

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

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

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

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