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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: A = None
        self.y: D = None
        self.z: F = None
        self.w: A = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.x: B = None
        self.p: A = None
        self.w: B = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.w: B = None
        self.s: G = None
        self.y: H = None
        self.q: D = None
        self.v: D = None
        self.u: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: A = None
        self.y: D = None
        self.z: F = None
        self.w: A = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.x: B = None
        self.p: A = None
        self.w: B = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.w: B = None
        self.s: G = None
        self.y: H = None
        self.q: D = None
        self.v: D = None
        self.u: G = None
        self.txt = txt

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

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