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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

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

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

e.o = g
e.t = g
e.w = d
e.v = d
e.r = i
e.y = m
b.q = m
m.y = n
k.q = j
k.p = m
k.o = e
l.v = i
l.y = m
l.u = b
l.p = n
g.x = i
g.v = k
g.p = b
d.s = l
d.u = l
d.o = j
n.y = j
n.x = j
n.o = i
n.p = m
n.t = e
n.v = k
j.q = k
j.p = m
j.o = e
i.x = g
i.v = k
i.p = b
assert m.y.p.y.y.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: G = None
        self.r: F = None
        self.v: G = None
        self.y: C = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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