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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: B = None
        self.y: G = None
        self.o: A = None
        self.t: H = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: H = None
        self.t: C = None
        self.u: G = None
        self.y: C = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: B = None
        self.y: G = None
        self.o: A = None
        self.t: H = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: H = None
        self.t: C = None
        self.u: G = None
        self.y: C = None
        self.v: H = None
        self.txt = txt

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

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

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

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