class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.y: G = None
        self.t: F = None
        self.p: F = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: F = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: A = None
        self.t: E = None
        self.y: E = None
        self.u: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: F = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: A = None
        self.t: E = None
        self.y: E = None
        self.u: A = None
        self.txt = txt

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

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

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