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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.z: B = None
        self.u: B = None
        self.t: F = None
        self.o: F = None
        self.p: H = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: D = None
        self.w: D = None
        self.p: B = None
        self.o: A = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

b = A("b")
g = B("g")
h = C("h")
n = D("n")
a = E("a")
f = F("f")
k = G("k")
e = H("e")
m = D("m")
i = F("i")

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.z: B = None
        self.u: B = None
        self.t: F = None
        self.o: F = None
        self.p: H = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: D = None
        self.w: D = None
        self.p: B = None
        self.o: A = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

b = A("b")
g = B("g")
h = C("h")
n = D("n")
a = E("a")
f = F("f")
k = G("k")
e = H("e")
m = D("m")
i = F("i")

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