class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: C = None
        self.z: C = None
        self.q: E = None
        self.t: H = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: D = None
        self.u: G = None
        self.t: H = None
        self.s: H = None
        self.y: H = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: F = None
        self.u: I = None
        self.y: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: F = None
        self.u: C = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: D = None
        self.u: G = None
        self.t: H = None
        self.s: H = None
        self.y: H = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: F = None
        self.u: I = None
        self.y: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: F = None
        self.u: C = None
        self.z: F = None
        self.txt = txt

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

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

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

l.v = e
l.t = e
l.u = i
l.z = i
l.q = h
l.o = g
g.v = b
g.z = a
g.u = f
g.t = e
g.s = e
g.y = e
g.p = e
i.v = f
a.q = e
a.t = b
a.u = d
a.y = d
h.u = e
h.v = d
h.z = i
h.w = i
h.o = g
h.p = f
h.t = f
b.z = g
b.w = h
f.o = i
f.u = i
f.w = b
f.z = b
e.p = b
e.s = h
e.o = h
e.q = a
e.z = i
e.t = i
e.u = l
e.w = l
e.r = g
d.p = b
d.y = i
d.r = i
d.z = a
d.o = h
d.u = l
c.v = e
c.t = e
c.u = i
c.z = i
c.q = h
c.o = g
assert e.r.t.t.v.o.v.z.w.txt == "h"