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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: F = None
        self.r: H = None
        self.t: A = None
        self.q: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: I = None
        self.z: C = None
        self.w: I = None
        self.u: C = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: H = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: I = None
        self.y: I = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: D = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

h = A("h")
g = B("g")
n = C("n")
e = D("e")
a = E("a")
l = F("l")
d = G("d")
b = H("b")
f = I("f")
j = H("j")

h.y = j
h.r = j
h.u = g
h.t = l
h.v = n
h.z = n
h.x = d
g.r = n
n.o = a
n.u = a
n.p = l
n.r = b
n.t = h
n.q = d
e.t = d
e.y = f
e.w = f
e.z = n
e.u = n
e.r = l
e.p = h
a.p = h
a.v = b
a.t = e
l.r = e
l.q = f
l.y = f
l.w = d
d.p = f
d.x = e
d.v = a
b.y = l
f.r = d
f.z = e
f.q = h
f.w = g
j.y = l
assert f.q.x.v.t.t.v.t.z.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: B = None
        self.t: F = None
        self.v: C = None
        self.z: C = None
        self.r: H = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: F = None
        self.r: H = None
        self.t: A = None
        self.q: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: I = None
        self.z: C = None
        self.w: I = None
        self.u: C = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: H = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: I = None
        self.y: I = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: D = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

h = A("h")
g = B("g")
n = C("n")
e = D("e")
a = E("a")
l = F("l")
d = G("d")
b = H("b")
f = I("f")
j = H("j")

h.y = j
h.r = j
h.u = g
h.t = l
h.v = n
h.z = n
h.x = d
g.r = n
n.o = a
n.u = a
n.p = l
n.r = b
n.t = h
n.q = d
e.t = d
e.y = f
e.w = f
e.z = n
e.u = n
e.r = l
e.p = h
a.p = h
a.v = b
a.t = e
l.r = e
l.q = f
l.y = f
l.w = d
d.p = f
d.x = e
d.v = a
b.y = l
f.r = d
f.z = e
f.q = h
f.w = g
j.y = l
assert f.q.x.v.t.t.v.t.z.q.v.txt == "a"