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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.s: A = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: G = None
        self.w: I = None
        self.u: C = None
        self.q: D = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.s: A = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: G = None
        self.w: I = None
        self.u: C = None
        self.q: D = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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