class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.x: D = None
        self.r: E = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: I = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: C = None
        self.y: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.x: D = None
        self.r: E = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: I = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: C = None
        self.y: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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