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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: I = None
        self.v: H = None
        self.t: D = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: J = None
        self.z: B = None
        self.w: C = None
        self.s: B = None
        self.p: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.v: D = None
        self.z: G = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: I = None
        self.v: H = None
        self.t: D = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: J = None
        self.z: B = None
        self.w: C = None
        self.s: B = None
        self.p: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.v: D = None
        self.z: G = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.x: C = None
        self.txt = txt

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

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