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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: D = None
        self.v: I = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: D = None
        self.u: G = None
        self.q: F = None
        self.s: G = None
        self.w: D = None
        self.p: H = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.s: H = None
        self.x: H = None
        self.p: D = None
        self.r: C = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: D = None
        self.r: E = None
        self.o: I = None
        self.x: C = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: D = None
        self.v: I = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: D = None
        self.u: G = None
        self.q: F = None
        self.s: G = None
        self.w: D = None
        self.p: H = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.s: H = None
        self.x: H = None
        self.p: D = None
        self.r: C = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: D = None
        self.r: E = None
        self.o: I = None
        self.x: C = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

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

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