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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: A = None
        self.q: C = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.z: I = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: A = None
        self.q: C = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.z: I = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

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

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