class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: E = None
        self.v: D = None
        self.o: D = None
        self.r: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.z: D = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.z: D = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

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

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

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

l.p = e
l.u = g
l.v = c
l.o = c
l.r = f
n.v = g
b.s = l
b.r = a
b.z = c
b.o = e
b.p = d
a.z = n
a.v = c
a.q = l
a.t = b
g.x = e
f.p = b
f.u = g
f.v = c
f.o = a
f.r = l
m.z = d
m.v = c
m.q = l
m.t = b
e.s = l
e.r = a
e.z = a
e.o = b
e.p = n
c.z = n
c.v = m
c.q = l
c.t = e
d.v = g
assert e.o.r.v.v.t.txt == "b"