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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: C = None
        self.s: E = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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

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

n = A("n")
l = B("l")
b = C("b")
a = D("a")
g = E("g")
j = C("j")
e = D("e")
d = B("d")
c = C("c")

n.w = a
n.q = g
n.v = g
n.u = e
n.x = c
l.u = a
l.w = c
l.s = g
l.o = e
l.x = n
b.z = d
b.y = c
a.q = c
a.v = n
g.y = d
g.o = n
g.p = n
j.z = l
j.y = c
e.q = b
e.v = n
d.u = a
d.o = a
d.w = j
d.s = g
d.x = n
c.z = d
c.y = b
assert e.q.z.o.v.q.o.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: E = None
        self.v: E = None
        self.u: D = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: C = None
        self.s: E = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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

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

n = A("n")
l = B("l")
b = C("b")
a = D("a")
g = E("g")
j = C("j")
e = D("e")
d = B("d")
c = C("c")

n.w = a
n.q = g
n.v = g
n.u = e
n.x = c
l.u = a
l.w = c
l.s = g
l.o = e
l.x = n
b.z = d
b.y = c
a.q = c
a.v = n
g.y = d
g.o = n
g.p = n
j.z = l
j.y = c
e.q = b
e.v = n
d.u = a
d.o = a
d.w = j
d.s = g
d.x = n
c.z = d
c.y = b
assert e.q.z.o.v.q.o.u.q.txt == "b"