class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: G = None
        self.z: C = None
        self.y: B = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: E = None
        self.y: I = None
        self.x: I = None
        self.s: D = None
        self.o: E = None
        self.v: D = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: E = None
        self.y: I = None
        self.x: I = None
        self.s: D = None
        self.o: E = None
        self.v: D = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

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