class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: D = None
        self.r: B = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: D = None
        self.v: C = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: D = None
        self.v: C = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

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

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