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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

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

g.y = b
g.x = l
e.o = c
e.p = c
e.z = j
e.x = b
e.s = l
k.p = c
k.s = m
k.r = m
k.y = b
k.w = b
b.p = k
b.y = c
b.x = i
b.s = g
l.v = m
l.q = m
l.z = b
i.p = c
i.s = g
i.y = b
i.w = b
i.r = m
m.y = b
m.x = l
j.o = e
j.z = c
j.p = c
j.x = b
j.s = l
c.o = e
c.z = e
c.x = b
c.p = j
c.s = l
assert k.p.p.s.v.txt == "m"