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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: H = None
        self.w: A = None
        self.x: D = None
        self.y: I = None
        self.r: H = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: H = None
        self.w: A = None
        self.x: D = None
        self.y: I = None
        self.r: H = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

n.t = d
n.x = j
k.z = g
j.r = d
j.z = f
d.s = k
d.x = k
d.r = c
d.v = f
d.o = g
d.u = g
d.y = i
i.o = n
i.p = k
i.x = k
i.y = e
e.t = c
e.q = f
e.r = f
e.w = n
e.s = n
e.x = d
e.y = g
c.v = f
c.r = g
f.s = g
f.v = j
f.q = c
f.o = n
f.t = d
g.o = f
assert i.y.w.t.s.txt == "k"