class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: H = None
        self.s: I = None
        self.v: F = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: A = None
        self.p: A = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: A = None
        self.p: A = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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