class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: B = None
        self.o: C = None
        self.x: A = None
        self.v: A = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: E = None
        self.w: E = None
        self.u: C = None
        self.p: E = None
        self.x: F = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.z: A = None
        self.o: G = None
        self.t: D = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.t: B = None
        self.r: C = None
        self.w: B = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: E = None
        self.w: E = None
        self.u: C = None
        self.p: E = None
        self.x: F = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.z: A = None
        self.o: G = None
        self.t: D = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.t: B = None
        self.r: C = None
        self.w: B = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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