class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.q: E = None
        self.v: E = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: H = None
        self.o: I = None
        self.p: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.v: C = None
        self.y: B = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: H = None
        self.x: E = None
        self.q: F = None
        self.r: C = None
        self.txt = txt

k = A("k")
d = B("d")
n = C("n")
c = D("c")
j = E("j")
h = F("h")
g = G("g")
f = H("f")
e = I("e")

k.z = d
k.o = n
k.q = j
k.v = j
k.w = j
d.s = f
d.y = g
d.o = c
d.r = n
d.q = h
n.y = k
c.x = e
c.o = e
c.v = f
c.p = f
c.r = k
j.v = f
h.p = n
h.v = n
h.u = k
h.y = d
h.r = j
g.o = k
g.z = c
g.u = e
f.o = k
f.z = c
f.s = g
f.q = n
f.p = n
f.y = e
f.x = j
f.r = h
e.u = f
e.w = f
e.x = j
e.q = h
e.r = n
assert d.r.y.o.y.z.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.q: E = None
        self.v: E = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: H = None
        self.o: I = None
        self.p: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.v: C = None
        self.y: B = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: H = None
        self.x: E = None
        self.q: F = None
        self.r: C = None
        self.txt = txt

k = A("k")
d = B("d")
n = C("n")
c = D("c")
j = E("j")
h = F("h")
g = G("g")
f = H("f")
e = I("e")

k.z = d
k.o = n
k.q = j
k.v = j
k.w = j
d.s = f
d.y = g
d.o = c
d.r = n
d.q = h
n.y = k
c.x = e
c.o = e
c.v = f
c.p = f
c.r = k
j.v = f
h.p = n
h.v = n
h.u = k
h.y = d
h.r = j
g.o = k
g.z = c
g.u = e
f.o = k
f.z = c
f.s = g
f.q = n
f.p = n
f.y = e
f.x = j
f.r = h
e.u = f
e.w = f
e.x = j
e.q = h
e.r = n
assert d.r.y.o.y.z.s.y.txt == "e"