class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: C = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

i = A("i")
l = B("l")
c = C("c")
e = D("e")
b = E("b")
h = E("h")
m = C("m")
d = A("d")
j = B("j")
k = D("k")

i.p = e
l.z = b
l.s = i
l.u = k
c.s = b
c.q = l
c.t = e
e.y = i
e.v = c
b.s = h
b.w = h
b.p = h
b.t = m
h.s = b
h.w = b
h.p = b
h.t = c
m.s = h
m.q = l
m.t = k
d.p = e
j.z = h
j.s = i
j.u = k
k.y = d
k.v = c
assert e.y.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: C = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

i = A("i")
l = B("l")
c = C("c")
e = D("e")
b = E("b")
h = E("h")
m = C("m")
d = A("d")
j = B("j")
k = D("k")

i.p = e
l.z = b
l.s = i
l.u = k
c.s = b
c.q = l
c.t = e
e.y = i
e.v = c
b.s = h
b.w = h
b.p = h
b.t = m
h.s = b
h.w = b
h.p = b
h.t = c
m.s = h
m.q = l
m.t = k
d.p = e
j.z = h
j.s = i
j.u = k
k.y = d
k.v = c
assert e.y.p.y.txt == "i"