class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.x: B = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: G = None
        self.x: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.w: F = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: I = None
        self.p: A = None
        self.w: A = None
        self.o: A = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.s: D = None
        self.v: B = None
        self.x: H = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.x: B = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: G = None
        self.x: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.w: F = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: I = None
        self.p: A = None
        self.w: A = None
        self.o: A = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.s: D = None
        self.v: B = None
        self.x: H = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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