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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.t: A = None
        self.x: C = None
        self.v: F = None
        self.s: G = None
        self.y: I = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.x: C = None
        self.o: E = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

m = A("m")
k = B("k")
c = C("c")
e = D("e")
n = E("n")
a = F("a")
g = G("g")
f = H("f")
l = I("l")

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.t: A = None
        self.x: C = None
        self.v: F = None
        self.s: G = None
        self.y: I = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.x: C = None
        self.o: E = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

m = A("m")
k = B("k")
c = C("c")
e = D("e")
n = E("n")
a = F("a")
g = G("g")
f = H("f")
l = I("l")

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