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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: D = None
        self.w: H = None
        self.o: G = None
        self.p: G = None
        self.u: I = None
        self.q: I = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.s: F = None
        self.v: I = None
        self.q: I = None
        self.w: H = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: B = None
        self.u: H = None
        self.v: E = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.z: E = None
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: D = None
        self.w: H = None
        self.o: G = None
        self.p: G = None
        self.u: I = None
        self.q: I = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.s: F = None
        self.v: I = None
        self.q: I = None
        self.w: H = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: B = None
        self.u: H = None
        self.v: E = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.z: E = None
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

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