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

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

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

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

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

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

l.s = e
l.w = e
l.u = b
l.o = a
i.r = l
i.v = l
g.p = b
g.y = l
n.v = j
n.y = f
j.u = e
j.x = f
j.w = f
j.y = l
j.p = b
b.r = l
b.v = l
f.v = j
f.y = n
a.p = b
a.y = l
e.u = j
e.x = n
e.y = l
e.p = b
e.w = f
assert i.v.w.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: B = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

l.s = e
l.w = e
l.u = b
l.o = a
i.r = l
i.v = l
g.p = b
g.y = l
n.v = j
n.y = f
j.u = e
j.x = f
j.w = f
j.y = l
j.p = b
b.r = l
b.v = l
f.v = j
f.y = n
a.p = b
a.y = l
e.u = j
e.x = n
e.y = l
e.p = b
e.w = f
assert i.v.w.u.u.u.txt == "j"