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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.t: E = None
        self.y: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.t: E = None
        self.y: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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