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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: F = None
        self.y: G = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.q: G = None
        self.r: G = None
        self.v: A = None
        self.z: B = None
        self.p: C = None
        self.txt = txt

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

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

j.v = b
j.p = i
j.q = f
k.r = e
m.q = j
m.w = n
m.s = f
f.v = k
f.p = b
f.y = i
f.r = i
e.w = i
e.r = i
b.w = n
b.u = m
b.p = m
b.q = i
b.r = i
b.v = j
b.z = k
i.s = j
i.z = f
i.p = f
i.v = a
i.t = e
i.q = m
n.r = e
a.w = n
a.z = n
a.u = m
a.p = m
a.q = i
a.r = i
a.v = j
assert j.p.s.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: F = None
        self.y: G = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.q: G = None
        self.r: G = None
        self.v: A = None
        self.z: B = None
        self.p: C = None
        self.txt = txt

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

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

j.v = b
j.p = i
j.q = f
k.r = e
m.q = j
m.w = n
m.s = f
f.v = k
f.p = b
f.y = i
f.r = i
e.w = i
e.r = i
b.w = n
b.u = m
b.p = m
b.q = i
b.r = i
b.v = j
b.z = k
i.s = j
i.z = f
i.p = f
i.v = a
i.t = e
i.q = m
n.r = e
a.w = n
a.z = n
a.u = m
a.p = m
a.q = i
a.r = i
a.v = j
assert j.p.s.v.v.txt == "j"