class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: C = None
        self.v: I = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: E = None
        self.x: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: I = None
        self.s: B = None
        self.q: D = None
        self.v: D = None
        self.p: F = None
        self.r: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: H = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: B = None
        self.s: B = None
        self.p: D = None
        self.q: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: E = None
        self.x: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: I = None
        self.s: B = None
        self.q: D = None
        self.v: D = None
        self.p: F = None
        self.r: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: H = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: B = None
        self.s: B = None
        self.p: D = None
        self.q: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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