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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.u: B = None
        self.r: A = None
        self.txt = txt

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

b.z = a
b.u = l
b.w = j
f.s = g
f.x = l
f.t = j
f.q = n
j.u = e
j.s = n
n.y = j
n.t = e
a.p = f
a.u = f
a.q = e
a.r = b
g.y = j
g.t = a
l.y = c
l.t = a
e.p = f
e.u = f
e.q = a
e.r = b
c.u = e
c.s = l
k.y = c
k.t = a
assert a.u.q.y.u.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: D = None
        self.w: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.u: B = None
        self.r: A = None
        self.txt = txt

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

b.z = a
b.u = l
b.w = j
f.s = g
f.x = l
f.t = j
f.q = n
j.u = e
j.s = n
n.y = j
n.t = e
a.p = f
a.u = f
a.q = e
a.r = b
g.y = j
g.t = a
l.y = c
l.t = a
e.p = f
e.u = f
e.q = a
e.r = b
c.u = e
c.s = l
k.y = c
k.t = a
assert a.u.q.y.u.u.s.txt == "g"