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

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

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

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

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

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

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

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

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

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

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

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

g.z = i
g.u = h
g.s = k
i.y = a
i.r = a
i.w = h
f.y = a
f.o = i
f.v = i
h.x = i
h.v = i
h.q = a
h.t = m
h.y = j
a.x = i
m.y = a
m.o = i
m.v = i
n.x = i
k.z = i
k.u = h
k.s = g
j.y = n
j.o = i
j.v = i
assert i.y.x.r.x.r.txt == "a"