class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.z: D = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.q: F = None
        self.u: F = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: G = None
        self.o: E = None
        self.x: E = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.q: F = None
        self.u: F = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: G = None
        self.o: E = None
        self.x: E = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

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