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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: F = None
        self.o: E = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: A = None
        self.w: F = None
        self.t: E = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: F = None
        self.o: E = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: A = None
        self.w: F = None
        self.t: E = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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