class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.z: E = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: B = None
        self.p: E = None
        self.u: E = None
        self.txt = txt

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

n = A("n")
e = B("e")
l = C("l")
g = D("g")
b = E("b")
i = E("i")
a = A("a")

n.p = l
n.s = l
n.u = g
n.z = i
n.t = a
e.s = n
e.y = i
e.r = b
l.q = g
l.p = i
g.t = l
g.v = e
g.p = i
g.u = b
b.y = g
b.t = g
b.z = e
b.q = l
i.y = g
i.t = g
i.z = e
i.q = l
a.p = l
a.s = l
a.u = g
a.z = i
a.t = n
assert g.u.q.p.y.v.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.z: E = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: B = None
        self.p: E = None
        self.u: E = None
        self.txt = txt

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

n = A("n")
e = B("e")
l = C("l")
g = D("g")
b = E("b")
i = E("i")
a = A("a")

n.p = l
n.s = l
n.u = g
n.z = i
n.t = a
e.s = n
e.y = i
e.r = b
l.q = g
l.p = i
g.t = l
g.v = e
g.p = i
g.u = b
b.y = g
b.t = g
b.z = e
b.q = l
i.y = g
i.t = g
i.z = e
i.q = l
a.p = l
a.s = l
a.u = g
a.z = i
a.t = n
assert g.u.q.p.y.v.y.y.txt == "g"