class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: B = None
        self.v: E = None
        self.y: B = None
        self.t: F = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: F = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.txt = txt

e = A("e")
m = B("m")
g = C("g")
i = D("i")
a = E("a")
h = F("h")
d = F("d")
l = D("l")

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: F = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.txt = txt

e = A("e")
m = B("m")
g = C("g")
i = D("i")
a = E("a")
h = F("h")
d = F("d")
l = D("l")

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