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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: I = None
        self.w: E = None
        self.o: H = None
        self.s: I = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.p: I = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: E = None
        self.t: C = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: I = None
        self.w: E = None
        self.o: H = None
        self.s: I = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.p: I = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: E = None
        self.t: C = None
        self.v: D = None
        self.txt = txt

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

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

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

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