class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.s: F = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: D = None
        self.p: B = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: D = None
        self.p: B = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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