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

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

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

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

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

g = A("g")
n = B("n")
l = C("l")
d = D("d")
b = E("b")
e = E("e")
m = B("m")
j = B("j")
i = D("i")

g.s = b
g.q = b
g.y = b
g.t = j
g.x = j
n.y = m
l.p = n
l.w = b
l.s = e
l.o = d
l.q = g
d.p = i
d.s = l
d.t = n
b.p = e
b.r = l
b.q = l
b.o = j
e.p = b
e.r = l
e.q = l
e.o = n
m.y = n
j.y = n
i.p = d
i.s = l
i.t = m
assert l.o.s.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: E = None
        self.y: E = None
        self.t: B = None
        self.x: B = None
        self.txt = txt

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

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

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

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

g = A("g")
n = B("n")
l = C("l")
d = D("d")
b = E("b")
e = E("e")
m = B("m")
j = B("j")
i = D("i")

g.s = b
g.q = b
g.y = b
g.t = j
g.x = j
n.y = m
l.p = n
l.w = b
l.s = e
l.o = d
l.q = g
d.p = i
d.s = l
d.t = n
b.p = e
b.r = l
b.q = l
b.o = j
e.p = b
e.r = l
e.q = l
e.o = n
m.y = n
j.y = n
i.p = d
i.s = l
i.t = m
assert l.o.s.o.p.txt == "i"