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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: G = None
        self.u: D = None
        self.z: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: I = None
        self.o: B = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: G = None
        self.u: D = None
        self.z: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: I = None
        self.o: B = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

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