class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: E = None
        self.y: E = None
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.q: E = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.o: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: J = None
        self.o: H = None
        self.t: D = None
        self.r: D = None
        self.u: C = None
        self.z: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: F = None
        self.r: F = None
        self.x: G = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: I = None
        self.r: B = None
        self.w: H = None
        self.v: C = None
        self.t: H = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.q: E = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.o: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: J = None
        self.o: H = None
        self.t: D = None
        self.r: D = None
        self.u: C = None
        self.z: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: F = None
        self.r: F = None
        self.x: G = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: I = None
        self.r: B = None
        self.w: H = None
        self.v: C = None
        self.t: H = None
        self.q: H = None
        self.txt = txt

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

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