class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: J = None
        self.u: C = None
        self.x: A = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: B = None
        self.u: E = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: B = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.u: H = None
        self.z: A = None
        self.s: G = None
        self.w: D = None
        self.txt = txt

n = A("n")
l = B("l")
m = C("m")
i = D("i")
h = E("h")
c = F("c")
d = G("d")
b = H("b")
j = I("j")
a = J("a")

n.w = a
n.s = j
l.t = d
l.u = j
m.v = i
m.x = l
m.w = b
i.w = n
i.x = n
i.t = a
i.u = m
i.p = l
i.z = l
h.u = i
c.z = m
c.r = h
c.p = n
c.u = d
d.t = i
d.y = a
d.w = b
b.q = j
b.s = l
b.z = l
b.u = h
j.r = d
j.v = l
j.q = h
j.o = h
a.p = m
a.y = d
a.s = d
a.u = b
a.z = n
a.w = i
assert a.z.w.p.w.u.u.z.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: J = None
        self.u: C = None
        self.x: A = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: B = None
        self.u: E = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: B = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.u: H = None
        self.z: A = None
        self.s: G = None
        self.w: D = None
        self.txt = txt

n = A("n")
l = B("l")
m = C("m")
i = D("i")
h = E("h")
c = F("c")
d = G("d")
b = H("b")
j = I("j")
a = J("a")

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