class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.s: C = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: A = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: F = None
        self.z: C = None
        self.s: A = None
        self.v: D = None
        self.w: D = None
        self.q: G = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: F = None
        self.r: H = None
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: A = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: F = None
        self.z: C = None
        self.s: A = None
        self.v: D = None
        self.w: D = None
        self.q: G = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: F = None
        self.r: H = None
        self.x: G = None
        self.txt = txt

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

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