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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: A = None
        self.o: G = None
        self.s: A = 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.q: E = None
        self.w: G = None
        self.t: F = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: C = None
        self.u: E = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: A = None
        self.o: G = None
        self.s: A = 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.q: E = None
        self.w: G = None
        self.t: F = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: C = None
        self.u: E = None
        self.o: H = None
        self.txt = txt

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

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

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

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