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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.t: D = None
        self.q: A = None
        self.r: B = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

j = A("j")
l = B("l")
a = C("a")
d = D("d")
f = E("f")
c = F("c")
b = G("b")
i = C("i")
k = G("k")

j.z = i
j.u = f
l.s = a
l.t = i
a.z = i
a.q = b
a.p = j
d.w = f
d.q = a
f.u = d
f.p = j
f.v = l
f.r = c
c.p = k
c.v = b
b.u = l
b.r = l
b.p = l
b.s = j
b.q = j
b.t = d
b.v = f
i.z = a
i.q = k
i.p = j
k.u = l
k.r = l
k.p = l
k.s = j
k.q = j
k.t = d
k.v = f
assert b.q.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.t: D = None
        self.q: A = None
        self.r: B = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

j = A("j")
l = B("l")
a = C("a")
d = D("d")
f = E("f")
c = F("c")
b = G("b")
i = C("i")
k = G("k")

j.z = i
j.u = f
l.s = a
l.t = i
a.z = i
a.q = b
a.p = j
d.w = f
d.q = a
f.u = d
f.p = j
f.v = l
f.r = c
c.p = k
c.v = b
b.u = l
b.r = l
b.p = l
b.s = j
b.q = j
b.t = d
b.v = f
i.z = a
i.q = k
i.p = j
k.u = l
k.r = l
k.p = l
k.s = j
k.q = j
k.t = d
k.v = f
assert b.q.z.z.txt == "a"