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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.u: G = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: A = None
        self.r: I = None
        self.y: B = None
        self.u: I = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.z: B = None
        self.p: C = None
        self.w: I = None
        self.r: I = None
        self.q: C = None
        self.t: D = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

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

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

f = A("f")
l = B("l")
a = C("a")
i = D("i")
g = E("g")
j = F("j")
h = G("h")
k = H("k")
c = I("c")
e = G("e")

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.u: G = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: A = None
        self.r: I = None
        self.y: B = None
        self.u: I = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.z: B = None
        self.p: C = None
        self.w: I = None
        self.r: I = None
        self.q: C = None
        self.t: D = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

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

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

f = A("f")
l = B("l")
a = C("a")
i = D("i")
g = E("g")
j = F("j")
h = G("h")
k = H("k")
c = I("c")
e = G("e")

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