class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: G = None
        self.r: G = None
        self.v: G = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

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