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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: D = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

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

c = A("c")
l = B("l")
k = C("k")
n = D("n")
i = E("i")
j = D("j")
e = E("e")
m = B("m")
g = A("g")
b = E("b")

c.v = l
c.o = k
l.o = b
k.q = e
k.y = j
k.v = c
n.t = m
n.p = j
n.z = k
n.x = k
i.y = e
i.o = g
i.z = l
j.t = m
j.p = n
j.z = k
j.x = k
e.y = b
e.o = g
e.z = m
m.o = e
g.v = m
g.o = k
b.y = i
b.o = g
b.z = m
assert b.o.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: D = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

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

c = A("c")
l = B("l")
k = C("k")
n = D("n")
i = E("i")
j = D("j")
e = E("e")
m = B("m")
g = A("g")
b = E("b")

c.v = l
c.o = k
l.o = b
k.q = e
k.y = j
k.v = c
n.t = m
n.p = j
n.z = k
n.x = k
i.y = e
i.o = g
i.z = l
j.t = m
j.p = n
j.z = k
j.x = k
e.y = b
e.o = g
e.z = m
m.o = e
g.v = m
g.o = k
b.y = i
b.o = g
b.z = m
assert b.o.v.o.txt == "e"