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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: D = None
        self.w: E = None
        self.x: B = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: E = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: E = None
        self.p: B = None
        self.x: B = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: D = None
        self.w: E = None
        self.x: B = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: E = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: E = None
        self.p: B = None
        self.x: B = None
        self.s: G = None
        self.txt = txt

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

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