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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

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