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

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

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

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

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

j = A("j")
f = B("f")
a = C("a")
d = D("d")
i = E("i")
g = A("g")
h = E("h")
b = B("b")
e = C("e")

j.y = b
j.s = b
j.p = i
j.o = g
j.x = f
f.t = g
f.s = d
f.y = j
a.t = i
a.w = e
a.s = d
a.p = d
d.t = f
i.z = h
i.y = b
i.r = b
i.u = g
g.y = b
g.s = b
g.x = b
g.p = h
g.o = j
h.z = i
h.y = b
h.r = b
h.u = j
b.t = g
b.s = d
b.y = j
e.t = h
e.w = a
e.s = d
e.p = d
assert h.y.t.o.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: E = None
        self.o: A = None
        self.s: B = None
        self.x: B = None
        self.txt = txt

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

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

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

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

j = A("j")
f = B("f")
a = C("a")
d = D("d")
i = E("i")
g = A("g")
h = E("h")
b = B("b")
e = C("e")

j.y = b
j.s = b
j.p = i
j.o = g
j.x = f
f.t = g
f.s = d
f.y = j
a.t = i
a.w = e
a.s = d
a.p = d
d.t = f
i.z = h
i.y = b
i.r = b
i.u = g
g.y = b
g.s = b
g.x = b
g.p = h
g.o = j
h.z = i
h.y = b
h.r = b
h.u = j
b.t = g
b.s = d
b.y = j
e.t = h
e.w = a
e.s = d
e.p = d
assert h.y.t.o.x.y.txt == "j"