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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.q: H = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: C = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.q: H = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: C = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

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

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

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