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

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

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

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

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

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

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

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

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

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

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

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

b.y = d
b.u = n
b.v = i
b.o = l
c.w = f
c.q = a
c.o = a
c.p = a
a.v = d
d.x = a
d.t = a
d.y = b
d.q = f
d.r = i
f.z = a
f.x = d
j.w = l
j.q = a
j.o = a
j.p = a
l.z = a
l.x = i
i.x = a
i.t = a
i.y = m
i.q = f
i.r = d
m.y = d
m.v = d
m.u = n
m.o = l
n.y = i
n.v = i
n.u = m
n.o = f
assert b.v.r.q.z.v.txt == "d"