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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: G = None
        self.z: E = None
        self.s: H = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: F = None
        self.y: H = None
        self.w: A = None
        self.p: I = None
        self.v: H = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: A = None
        self.r: D = None
        self.p: D = None
        self.o: B = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: B = None
        self.o: F = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: C = None
        self.o: D = None
        self.u: I = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: D = None
        self.y: A = None
        self.z: B = None
        self.w: D = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: G = None
        self.z: E = None
        self.s: H = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: F = None
        self.y: H = None
        self.w: A = None
        self.p: I = None
        self.v: H = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: A = None
        self.r: D = None
        self.p: D = None
        self.o: B = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: B = None
        self.o: F = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: C = None
        self.o: D = None
        self.u: I = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: D = None
        self.y: A = None
        self.z: B = None
        self.w: D = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

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

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