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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

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

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

j.y = m
j.u = l
j.t = k
l.t = i
l.u = i
l.p = f
l.x = m
l.q = j
g.o = l
k.p = g
k.r = g
k.v = g
k.w = i
m.y = g
m.t = k
e.t = m
e.x = m
e.p = f
e.u = i
e.q = h
h.y = m
h.u = e
h.t = k
f.p = g
f.r = g
f.v = g
f.w = i
i.y = g
i.t = f
assert e.t.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: B = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

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

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

j.y = m
j.u = l
j.t = k
l.t = i
l.u = i
l.p = f
l.x = m
l.q = j
g.o = l
k.p = g
k.r = g
k.v = g
k.w = i
m.y = g
m.t = k
e.t = m
e.x = m
e.p = f
e.u = i
e.q = h
h.y = m
h.u = e
h.t = k
f.p = g
f.r = g
f.v = g
f.w = i
i.y = g
i.t = f
assert e.t.y.o.txt == "l"