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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: C = None
        self.s: G = None
        self.t: C = None
        self.o: E = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: B = None
        self.z: F = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.s: F = None
        self.t: B = None
        self.u: C = None
        self.w: G = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: F = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: C = None
        self.s: G = None
        self.t: C = None
        self.o: E = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: B = None
        self.z: F = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.s: F = None
        self.t: B = None
        self.u: C = None
        self.w: G = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: F = None
        self.z: D = None
        self.txt = txt

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

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