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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.u: E = None
        self.o: H = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: D = None
        self.y: I = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.v: A = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: B = None
        self.o: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.u: E = None
        self.o: H = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: D = None
        self.y: I = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.v: A = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: B = None
        self.o: A = None
        self.txt = txt

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

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