class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.v: G = None
        self.p: G = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: J = None
        self.o: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: J = None
        self.r: H = None
        self.u: C = None
        self.w: F = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.u: E = None
        self.v: H = None
        self.p: A = None
        self.q: E = None
        self.r: J = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: J = None
        self.q: F = None
        self.o: B = None
        self.x: G = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.v: F = None
        self.r: B = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: D = None
        self.w: E = None
        self.y: D = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.v: G = None
        self.p: G = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: J = None
        self.o: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: J = None
        self.r: H = None
        self.u: C = None
        self.w: F = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.u: E = None
        self.v: H = None
        self.p: A = None
        self.q: E = None
        self.r: J = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: J = None
        self.q: F = None
        self.o: B = None
        self.x: G = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.v: F = None
        self.r: B = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: D = None
        self.w: E = None
        self.y: D = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

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

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