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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.r: B = None
        self.w: G = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.v: B = None
        self.y: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.o: C = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

m = A("m")
g = B("g")
n = C("n")
j = D("j")
l = E("l")
i = F("i")
h = G("h")
k = D("k")
b = C("b")
c = A("c")

m.p = c
m.t = h
m.v = h
m.q = g
g.q = i
g.z = i
g.t = i
g.s = c
n.p = k
n.v = b
n.r = g
n.o = g
n.w = h
n.z = h
j.w = h
j.t = k
j.s = m
j.u = l
l.v = c
l.s = i
l.w = i
l.z = k
i.z = c
i.t = j
i.v = g
i.y = h
i.p = h
h.t = g
h.v = i
h.u = i
h.o = n
h.r = k
k.w = h
k.t = j
k.s = c
k.u = l
b.p = k
b.v = n
b.r = g
b.o = g
b.w = h
b.z = h
c.p = m
c.t = h
c.v = h
c.q = g
assert l.v.q.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: G = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.r: B = None
        self.w: G = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.v: B = None
        self.y: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.o: C = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

m = A("m")
g = B("g")
n = C("n")
j = D("j")
l = E("l")
i = F("i")
h = G("h")
k = D("k")
b = C("b")
c = A("c")

m.p = c
m.t = h
m.v = h
m.q = g
g.q = i
g.z = i
g.t = i
g.s = c
n.p = k
n.v = b
n.r = g
n.o = g
n.w = h
n.z = h
j.w = h
j.t = k
j.s = m
j.u = l
l.v = c
l.s = i
l.w = i
l.z = k
i.z = c
i.t = j
i.v = g
i.y = h
i.p = h
h.t = g
h.v = i
h.u = i
h.o = n
h.r = k
k.w = h
k.t = j
k.s = c
k.u = l
b.p = k
b.v = n
b.r = g
b.o = g
b.w = h
b.z = h
c.p = m
c.t = h
c.v = h
c.q = g
assert l.v.q.s.p.txt == "m"