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

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

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

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

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

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

g.o = j
g.s = m
g.u = e
g.p = f
m.u = j
m.x = k
k.p = f
k.v = f
k.u = e
k.y = j
k.q = h
a.x = m
a.y = k
j.r = m
h.x = m
h.y = f
e.o = j
e.s = m
e.u = g
e.p = k
f.p = k
f.v = k
f.u = g
f.y = j
f.q = h
n.o = j
n.s = m
n.u = e
n.p = k
assert a.y.u.u.u.u.o.r.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: B = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

g.o = j
g.s = m
g.u = e
g.p = f
m.u = j
m.x = k
k.p = f
k.v = f
k.u = e
k.y = j
k.q = h
a.x = m
a.y = k
j.r = m
h.x = m
h.y = f
e.o = j
e.s = m
e.u = g
e.p = k
f.p = k
f.v = k
f.u = g
f.y = j
f.q = h
n.o = j
n.s = m
n.u = e
n.p = k
assert a.y.u.u.u.u.o.r.u.r.txt == "m"