class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.txt = txt

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

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

b.v = n
b.x = n
n.o = j
n.x = b
n.u = k
a.o = b
a.q = b
j.o = m
j.q = k
j.z = n
j.w = n
j.v = b
j.p = b
j.u = b
h.y = k
h.v = a
h.u = a
h.z = a
h.q = j
h.t = b
m.u = h
m.x = j
k.o = n
k.v = n
k.y = b
k.x = b
k.w = b
k.p = b
k.r = j
assert j.w.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.txt = txt

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

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

b.v = n
b.x = n
n.o = j
n.x = b
n.u = k
a.o = b
a.q = b
j.o = m
j.q = k
j.z = n
j.w = n
j.v = b
j.p = b
j.u = b
h.y = k
h.v = a
h.u = a
h.z = a
h.q = j
h.t = b
m.u = h
m.x = j
k.o = n
k.v = n
k.y = b
k.x = b
k.w = b
k.p = b
k.r = j
assert j.w.o.u.txt == "b"