class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: B = None
        self.w: F = None
        self.p: D = None
        self.o: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.u: E = None
        self.r: G = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.u: E = None
        self.r: G = None
        self.z: C = None
        self.txt = txt

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

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

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