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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: G = None
        self.r: H = None
        self.u: G = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: A = None
        self.t: F = None
        self.o: H = None
        self.u: H = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: G = None
        self.r: H = None
        self.u: G = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: A = None
        self.t: F = None
        self.o: H = None
        self.u: H = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

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

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

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

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