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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: D = None
        self.r: B = None
        self.x: E = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: D = None
        self.r: B = None
        self.x: E = None
        self.v: B = None
        self.txt = txt

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

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