class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: D = None
        self.x: I = None
        self.p: I = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: F = None
        self.u: F = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: B = None
        self.o: G = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: F = None
        self.u: F = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: B = None
        self.o: G = None
        self.r: C = None
        self.txt = txt

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

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