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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.t: F = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.o: F = None
        self.w: A = None
        self.z: F = None
        self.t: E = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.t: F = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.o: F = None
        self.w: A = None
        self.z: F = None
        self.t: E = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

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

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