class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: C = None
        self.q: C = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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

b = A("b")
d = B("d")
k = C("k")
h = D("h")
f = E("f")
j = C("j")
a = A("a")
g = D("g")
m = B("m")

b.s = m
b.o = k
b.q = j
b.z = a
b.p = a
d.p = f
d.u = f
k.o = f
k.x = m
k.w = b
k.z = h
h.u = m
h.w = a
h.p = f
h.o = f
h.q = d
f.r = b
f.o = b
j.o = f
j.x = d
j.w = a
j.z = g
a.s = d
a.o = k
a.q = j
a.z = b
a.p = b
g.u = d
g.q = d
g.w = b
g.p = f
g.o = f
m.p = f
m.u = f
assert h.u.u.r.p.z.o.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: C = None
        self.q: C = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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

b = A("b")
d = B("d")
k = C("k")
h = D("h")
f = E("f")
j = C("j")
a = A("a")
g = D("g")
m = B("m")

b.s = m
b.o = k
b.q = j
b.z = a
b.p = a
d.p = f
d.u = f
k.o = f
k.x = m
k.w = b
k.z = h
h.u = m
h.w = a
h.p = f
h.o = f
h.q = d
f.r = b
f.o = b
j.o = f
j.x = d
j.w = a
j.z = g
a.s = d
a.o = k
a.q = j
a.z = b
a.p = b
g.u = d
g.q = d
g.w = b
g.p = f
g.o = f
m.p = f
m.u = f
assert h.u.u.r.p.z.o.o.o.txt == "b"