class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: C = None
        self.q: H = None
        self.y: I = None
        self.u: E = None
        self.z: F = None
        self.x: D = None
        self.v: C = None
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.q: G = None
        self.v: B = None
        self.s: I = None
        self.o: H = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: D = None
        self.v: E = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: B = None
        self.s: G = None
        self.y: F = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.q: G = None
        self.v: B = None
        self.s: I = None
        self.o: H = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: D = None
        self.v: E = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: B = None
        self.s: G = None
        self.y: F = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

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

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