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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: G = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: A = None
        self.w: A = None
        self.v: A = None
        self.u: A = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

m = A("m")
l = B("l")
k = C("k")
e = D("e")
h = E("h")
g = F("g")
i = G("i")
a = G("a")
n = E("n")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: G = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: A = None
        self.w: A = None
        self.v: A = None
        self.u: A = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

m = A("m")
l = B("l")
k = C("k")
e = D("e")
h = E("h")
g = F("g")
i = G("i")
a = G("a")
n = E("n")

m.p = a
l.p = k
l.x = k
l.t = k
l.y = a
l.s = a
l.z = g
l.v = g
k.s = l
k.v = m
k.y = m
k.z = m
e.v = h
h.r = n
h.u = a
h.y = l
g.r = k
g.z = m
g.w = m
g.v = m
g.u = m
g.q = n
g.x = l
i.u = m
a.u = m
n.r = h
n.u = i
n.y = l
assert e.v.y.y.u.p.txt == "a"