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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.r: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: A = None
        self.t: E = None
        self.s: B = None
        self.txt = txt

d = A("d")
g = B("g")
j = C("j")
b = D("b")
e = E("e")
f = F("f")
k = G("k")
n = F("n")

d.z = g
d.q = b
d.t = b
d.y = e
d.r = e
d.p = k
g.q = d
g.s = k
j.o = e
j.v = e
j.u = e
j.x = b
j.t = b
j.s = f
j.z = g
b.y = j
b.s = e
b.r = k
b.w = d
e.y = j
e.s = j
e.v = d
f.y = b
k.y = j
k.x = d
k.t = e
k.s = g
n.y = b
assert n.y.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: D = None
        self.y: E = None
        self.t: D = None
        self.r: E = None
        self.p: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.r: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: A = None
        self.t: E = None
        self.s: B = None
        self.txt = txt

d = A("d")
g = B("g")
j = C("j")
b = D("b")
e = E("e")
f = F("f")
k = G("k")
n = F("n")

d.z = g
d.q = b
d.t = b
d.y = e
d.r = e
d.p = k
g.q = d
g.s = k
j.o = e
j.v = e
j.u = e
j.x = b
j.t = b
j.s = f
j.z = g
b.y = j
b.s = e
b.r = k
b.w = d
e.y = j
e.s = j
e.v = d
f.y = b
k.y = j
k.x = d
k.t = e
k.s = g
n.y = b
assert n.y.w.p.txt == "k"