class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: A = None
        self.w: A = None
        self.p: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.r: D = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.r: D = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

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

k.q = c
k.s = c
k.w = c
k.p = c
m.p = g
m.q = g
m.y = c
h.p = c
h.y = g
h.v = e
h.x = e
h.q = l
e.x = c
e.w = d
g.w = m
g.v = m
g.t = i
g.x = i
g.r = l
i.q = k
i.s = k
i.p = k
i.w = c
b.p = i
b.y = g
b.v = l
b.x = l
b.q = e
d.p = c
d.y = g
d.v = l
d.x = e
d.q = e
c.q = k
c.s = k
c.w = i
c.p = i
l.x = k
l.w = d
assert e.x.q.p.txt == "c"