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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.txt = txt

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

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

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

d.v = c
d.r = c
d.y = b
d.w = j
i.y = l
i.o = n
i.r = b
b.q = n
b.w = i
g.v = d
g.x = b
g.w = b
g.q = j
n.t = b
n.w = g
n.y = i
n.s = c
j.v = d
j.x = b
j.w = b
j.q = g
a.v = c
a.x = b
a.w = b
a.q = j
c.v = d
c.r = d
c.y = b
c.w = j
l.y = i
l.o = n
l.r = b
assert d.w.q.q.v.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: C = None
        self.r: A = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.txt = txt

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

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

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

d.v = c
d.r = c
d.y = b
d.w = j
i.y = l
i.o = n
i.r = b
b.q = n
b.w = i
g.v = d
g.x = b
g.w = b
g.q = j
n.t = b
n.w = g
n.y = i
n.s = c
j.v = d
j.x = b
j.w = b
j.q = g
a.v = c
a.x = b
a.w = b
a.q = j
c.v = d
c.r = d
c.y = b
c.w = j
l.y = i
l.o = n
l.r = b
assert d.w.q.q.v.y.w.txt == "i"