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

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

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

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

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

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

d.v = l
d.u = b
d.w = g
d.t = g
d.z = j
g.t = d
g.v = b
g.q = l
g.o = a
g.r = f
a.v = b
a.z = c
a.y = l
j.q = l
j.t = f
l.v = j
l.q = d
f.v = l
f.u = b
f.w = g
f.t = g
f.z = j
b.v = a
b.z = d
b.y = l
c.v = l
c.u = a
c.w = g
c.t = g
c.z = j
assert f.u.z.v.q.t.r.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: C = None
        self.w: B = None
        self.t: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

d.v = l
d.u = b
d.w = g
d.t = g
d.z = j
g.t = d
g.v = b
g.q = l
g.o = a
g.r = f
a.v = b
a.z = c
a.y = l
j.q = l
j.t = f
l.v = j
l.q = d
f.v = l
f.u = b
f.w = g
f.t = g
f.z = j
b.v = a
b.z = d
b.y = l
c.v = l
c.u = a
c.w = g
c.t = g
c.z = j
assert f.u.z.v.q.t.r.z.q.txt == "l"