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

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

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

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

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

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

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

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

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

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

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

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

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