class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.v: A = None
        self.w: A = None
        self.z: G = None
        self.y: F = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.r: I = None
        self.o: D = None
        self.p: D = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: H = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: H = None
        self.q: F = None
        self.u: G = None
        self.r: D = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.v: A = None
        self.w: A = None
        self.z: G = None
        self.y: F = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.r: I = None
        self.o: D = None
        self.p: D = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: H = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: H = None
        self.q: F = None
        self.u: G = None
        self.r: D = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

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