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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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