class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.v: E = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: H = None
        self.r: D = None
        self.x: C = None
        self.u: D = None
        self.t: H = None
        self.w: D = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: F = None
        self.v: G = None
        self.o: B = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: G = None
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: H = None
        self.r: D = None
        self.x: C = None
        self.u: D = None
        self.t: H = None
        self.w: D = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: F = None
        self.v: G = None
        self.o: B = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: G = None
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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