class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.x: I = None
        self.s: A = None
        self.y: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: H = None
        self.w: D = None
        self.q: A = None
        self.r: F = None
        self.x: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.x: I = None
        self.s: A = None
        self.y: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: H = None
        self.w: D = None
        self.q: A = None
        self.r: F = None
        self.x: A = None
        self.p: A = None
        self.txt = txt

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

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