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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.y: B = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

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

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

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

c = A("c")
g = B("g")
l = C("l")
n = D("n")
b = E("b")
a = E("a")
j = C("j")
m = B("m")

c.p = l
c.t = n
c.q = m
g.q = c
g.w = c
g.v = c
g.y = m
g.x = n
l.q = c
l.s = m
n.w = g
b.q = c
b.x = n
b.u = n
b.s = m
a.q = c
a.x = n
a.u = n
a.s = m
j.q = c
j.s = g
m.q = c
m.w = c
m.v = c
m.y = g
m.x = n
assert m.y.y.v.p.s.v.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: D = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.y: B = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

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

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

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

c = A("c")
g = B("g")
l = C("l")
n = D("n")
b = E("b")
a = E("a")
j = C("j")
m = B("m")

c.p = l
c.t = n
c.q = m
g.q = c
g.w = c
g.v = c
g.y = m
g.x = n
l.q = c
l.s = m
n.w = g
b.q = c
b.x = n
b.u = n
b.s = m
a.q = c
a.x = n
a.u = n
a.s = m
j.q = c
j.s = g
m.q = c
m.w = c
m.v = c
m.y = g
m.x = n
assert m.y.y.v.p.s.v.p.s.txt == "m"