class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: F = None
        self.t: H = None
        self.v: D = None
        self.txt = txt

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

b.y = c
b.q = n
d.v = g
n.w = g
l.r = h
l.w = b
k.t = b
k.v = g
k.u = l
c.p = b
c.v = l
c.u = l
c.w = n
c.s = a
c.o = h
g.t = n
g.w = b
h.t = l
h.o = b
h.v = b
h.w = b
h.r = k
h.y = k
h.p = d
h.s = n
h.z = g
a.x = k
a.s = c
a.t = h
a.v = l
assert h.t.w.y.w.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: F = None
        self.t: H = None
        self.v: D = None
        self.txt = txt

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

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