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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.t: G = None
        self.y: C = None
        self.v: A = None
        self.w: E = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: B = None
        self.w: E = None
        self.o: E = None
        self.y: F = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.v: E = None
        self.u: C = None
        self.o: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.t: G = None
        self.y: C = None
        self.v: A = None
        self.w: E = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: B = None
        self.w: E = None
        self.o: E = None
        self.y: F = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.v: E = None
        self.u: C = None
        self.o: C = None
        self.txt = txt

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

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