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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: I = None
        self.x: G = None
        self.t: A = None
        self.o: I = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.t: G = None
        self.o: H = None
        self.v: H = None
        self.y: G = None
        self.q: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: I = None
        self.x: G = None
        self.t: A = None
        self.o: I = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.t: G = None
        self.o: H = None
        self.v: H = None
        self.y: G = None
        self.q: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

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