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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.t: D = None
        self.s: C = None
        self.r: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.t: D = None
        self.s: C = None
        self.r: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

n.v = g
n.y = b
d.w = e
d.y = i
d.r = i
d.t = l
d.s = k
k.y = b
l.u = i
b.q = i
b.y = g
b.s = g
b.v = d
b.r = k
g.v = n
g.y = b
a.w = l
a.y = i
a.t = e
a.s = k
a.r = d
i.w = l
i.t = l
i.y = d
i.s = k
i.r = a
e.u = i
assert i.r.w.u.t.u.r.y.txt == "i"