class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.t: E = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: B = None
        self.x: F = None
        self.v: I = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: E = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.w: F = None
        self.t: H = None
        self.z: C = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.t: E = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: B = None
        self.x: F = None
        self.v: I = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: E = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.w: F = None
        self.t: H = None
        self.z: C = None
        self.r: D = None
        self.txt = txt

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

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