class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: I = None
        self.q: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: G = None
        self.u: G = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: H = None
        self.p: B = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: G = None
        self.u: G = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: H = None
        self.p: B = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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