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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.p: I = None
        self.t: B = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: H = None
        self.v: F = None
        self.x: G = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: C = None
        self.w: G = None
        self.r: I = None
        self.s: H = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.p: I = None
        self.t: B = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: H = None
        self.v: F = None
        self.x: G = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: C = None
        self.w: G = None
        self.r: I = None
        self.s: H = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

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

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

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