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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.p: I = None
        self.s: G = None
        self.y: F = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: B = None
        self.u: F = None
        self.s: C = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: B = None
        self.y: A = None
        self.o: C = None
        self.p: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: H = None
        self.v: E = None
        self.s: C = None
        self.w: B = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.p: I = None
        self.s: G = None
        self.y: F = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: B = None
        self.u: F = None
        self.s: C = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: B = None
        self.y: A = None
        self.o: C = None
        self.p: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: H = None
        self.v: E = None
        self.s: C = None
        self.w: B = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

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

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