class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: B = None
        self.u: F = None
        self.v: I = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: A = None
        self.o: G = None
        self.x: H = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: A = None
        self.o: G = None
        self.x: H = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

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

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