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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: F = None
        self.r: B = None
        self.p: A = None
        self.q: F = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: F = None
        self.r: B = None
        self.p: A = None
        self.q: F = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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