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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: E = None
        self.t: E = None
        self.x: G = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: H = None
        self.z: H = None
        self.p: F = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: E = None
        self.t: E = None
        self.x: G = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: H = None
        self.z: H = None
        self.p: F = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

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

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