class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: G = None
        self.v: A = None
        self.r: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: F = None
        self.q: E = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: H = None
        self.u: A = None
        self.x: J = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.o: I = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: J = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: G = None
        self.v: A = None
        self.r: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: F = None
        self.q: E = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: H = None
        self.u: A = None
        self.x: J = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.o: I = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: J = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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