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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: A = None
        self.s: G = None
        self.t: H = None
        self.r: F = None
        self.y: F = None
        self.v: J = None
        self.u: B = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.p: G = None
        self.v: G = None
        self.s: H = None
        self.o: B = None
        self.x: C = None
        self.w: B = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.y: E = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: A = None
        self.p: D = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: A = None
        self.w: C = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: H = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: A = None
        self.s: G = None
        self.t: H = None
        self.r: F = None
        self.y: F = None
        self.v: J = None
        self.u: B = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.p: G = None
        self.v: G = None
        self.s: H = None
        self.o: B = None
        self.x: C = None
        self.w: B = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.y: E = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: A = None
        self.p: D = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: A = None
        self.w: C = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: H = None
        self.v: C = None
        self.txt = txt

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

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