class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: I = None
        self.z: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: B = None
        self.r: C = None
        self.v: H = None
        self.u: B = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.y: H = None
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: B = None
        self.r: C = None
        self.v: H = None
        self.u: B = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.y: H = None
        self.o: H = None
        self.txt = txt

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

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