class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: J = None
        self.v: I = None
        self.u: I = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.p: H = None
        self.r: J = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: D = None
        self.u: H = None
        self.r: B = None
        self.x: I = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: I = None
        self.y: A = None
        self.w: C = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: J = None
        self.v: I = None
        self.u: I = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.p: H = None
        self.r: J = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: D = None
        self.u: H = None
        self.r: B = None
        self.x: I = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: I = None
        self.y: A = None
        self.w: C = None
        self.o: G = None
        self.txt = txt

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

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

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

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