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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.p: G = None
        self.x: C = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.z: I = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: I = None
        self.t: C = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: A = None
        self.u: E = None
        self.x: A = None
        self.r: A = None
        self.t: F = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: C = None
        self.z: E = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.p: G = None
        self.x: C = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.z: I = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: I = None
        self.t: C = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: A = None
        self.u: E = None
        self.x: A = None
        self.r: A = None
        self.t: F = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: C = None
        self.z: E = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

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

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

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