class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: I = None
        self.u: E = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: A = None
        self.t: H = None
        self.u: A = None
        self.x: F = None
        self.s: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: A = None
        self.t: H = None
        self.u: A = None
        self.x: F = None
        self.s: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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