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

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

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

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

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

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

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

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

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

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

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

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

j.x = b
i.s = b
i.o = n
i.w = f
i.v = a
f.u = h
g.q = j
g.s = j
g.z = a
g.t = f
g.y = l
a.w = f
b.s = l
b.o = g
b.w = f
b.v = h
d.x = i
l.s = b
l.o = n
l.w = f
l.v = h
n.q = d
n.s = d
n.z = a
n.t = f
n.y = l
h.w = f
assert b.o.y.o.s.txt == "d"