class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: C = None
        self.r: F = None
        self.x: J = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: C = None
        self.y: A = None
        self.v: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: A = None
        self.s: I = None
        self.x: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: D = None
        self.v: C = None
        self.o: E = None
        self.x: A = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: C = None
        self.y: A = None
        self.v: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: A = None
        self.s: I = None
        self.x: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: D = None
        self.v: C = None
        self.o: E = None
        self.x: A = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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