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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

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