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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: H = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: G = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: H = None
        self.p: A = None
        self.q: F = None
        self.y: J = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: B = None
        self.p: C = None
        self.t: E = None
        self.u: I = None
        self.v: B = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: E = None
        self.p: E = None
        self.o: C = None
        self.t: E = None
        self.x: B = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: H = None
        self.v: D = None
        self.r: C = None
        self.x: B = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: H = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: G = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: H = None
        self.p: A = None
        self.q: F = None
        self.y: J = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: B = None
        self.p: C = None
        self.t: E = None
        self.u: I = None
        self.v: B = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: E = None
        self.p: E = None
        self.o: C = None
        self.t: E = None
        self.x: B = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: H = None
        self.v: D = None
        self.r: C = None
        self.x: B = None
        self.z: F = None
        self.txt = txt

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

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