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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: D = None
        self.t: F = None
        self.txt = txt

j = A("j")
g = B("g")
k = C("k")
l = D("l")
n = E("n")
m = F("m")
e = F("e")

j.v = n
j.q = l
g.p = m
g.o = m
g.w = m
g.y = j
g.s = k
k.p = j
l.p = j
l.w = j
n.o = k
n.t = j
n.x = e
m.q = n
m.p = l
m.t = e
e.q = n
e.p = l
e.t = m
assert n.x.p.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: D = None
        self.t: F = None
        self.txt = txt

j = A("j")
g = B("g")
k = C("k")
l = D("l")
n = E("n")
m = F("m")
e = F("e")

j.v = n
j.q = l
g.p = m
g.o = m
g.w = m
g.y = j
g.s = k
k.p = j
l.p = j
l.w = j
n.o = k
n.t = j
n.x = e
m.q = n
m.p = l
m.t = e
e.q = n
e.p = l
e.t = m
assert n.x.p.p.v.txt == "n"