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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: G = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: G = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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