class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.r: F = None
        self.s: C = None
        self.q: C = None
        self.v: F = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.p: D = None
        self.r: E = None
        self.z: F = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: E = None
        self.p: C = None
        self.o: A = None
        self.r: B = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

m = A("m")
i = B("i")
h = C("h")
n = D("n")
f = E("f")
d = F("d")
k = G("k")
j = F("j")
l = D("l")
a = E("a")

m.x = l
m.t = j
m.r = d
m.v = d
m.o = d
m.s = h
m.q = h
i.v = d
i.y = l
i.p = n
i.r = f
i.z = j
i.s = h
h.w = l
h.z = d
h.r = a
h.p = m
h.v = i
n.r = j
n.q = k
f.q = i
f.s = l
f.p = m
f.z = m
f.o = m
f.y = k
d.v = j
d.w = m
d.q = k
d.p = k
k.y = d
k.z = f
k.w = f
k.t = f
k.p = h
k.o = m
k.r = i
j.v = d
j.w = m
j.q = k
j.p = k
l.r = d
l.q = k
a.q = i
a.s = l
a.p = m
a.z = m
a.o = m
a.y = k
assert n.q.r.p.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.r: F = None
        self.s: C = None
        self.q: C = None
        self.v: F = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.p: D = None
        self.r: E = None
        self.z: F = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: E = None
        self.p: C = None
        self.o: A = None
        self.r: B = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

m = A("m")
i = B("i")
h = C("h")
n = D("n")
f = E("f")
d = F("d")
k = G("k")
j = F("j")
l = D("l")
a = E("a")

m.x = l
m.t = j
m.r = d
m.v = d
m.o = d
m.s = h
m.q = h
i.v = d
i.y = l
i.p = n
i.r = f
i.z = j
i.s = h
h.w = l
h.z = d
h.r = a
h.p = m
h.v = i
n.r = j
n.q = k
f.q = i
f.s = l
f.p = m
f.z = m
f.o = m
f.y = k
d.v = j
d.w = m
d.q = k
d.p = k
k.y = d
k.z = f
k.w = f
k.t = f
k.p = h
k.o = m
k.r = i
j.v = d
j.w = m
j.q = k
j.p = k
l.r = d
l.q = k
a.q = i
a.s = l
a.p = m
a.z = m
a.o = m
a.y = k
assert n.q.r.p.txt == "n"