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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.s: E = None
        self.o: G = None
        self.x: C = None
        self.q: G = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: A = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.s: E = None
        self.o: G = None
        self.x: C = None
        self.q: G = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: A = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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