class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: C = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.r: G = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.z: F = None
        self.p: F = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

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

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

a.t = c
a.r = m
a.p = g
a.y = d
d.p = j
d.s = c
d.t = e
d.o = h
d.v = a
m.y = h
h.t = e
h.y = e
h.o = a
h.v = m
h.r = g
h.u = n
h.x = j
j.u = h
j.x = e
j.r = c
j.q = c
g.w = e
g.t = d
g.q = d
g.x = c
g.o = h
g.r = m
g.s = m
g.y = m
g.z = m
c.y = j
c.u = d
n.u = a
n.t = a
n.z = g
n.p = g
n.r = g
n.w = d
e.p = a
e.y = c
e.x = c
e.t = d
e.w = d
e.v = h
assert g.s.y.t.v.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: C = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.r: G = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.z: F = None
        self.p: F = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

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

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

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