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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

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

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

l.o = m
l.q = j
l.u = f
l.x = n
l.t = d
i.t = n
m.x = b
j.w = e
j.s = d
j.r = b
c.r = n
c.w = e
c.v = j
e.o = m
e.q = d
e.u = f
e.x = i
e.t = j
d.w = l
d.s = j
d.r = b
b.r = n
b.w = l
b.v = d
n.t = i
f.r = i
f.w = e
f.v = d
assert b.w.q.w.o.x.v.w.txt == "l"