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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: I = None
        self.w: I = None
        self.t: B = None
        self.y: H = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.v: D = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.s: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: D = None
        self.w: G = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: I = None
        self.w: I = None
        self.t: B = None
        self.y: H = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.v: D = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.s: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: D = None
        self.w: G = None
        self.p: D = None
        self.txt = txt

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

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