class A:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: C = None
        self.s: E = None
        self.r: E = None
        self.t: J = None
        self.w: E = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: E = None
        self.q: D = None
        self.z: J = None
        self.r: D = None
        self.p: I = None
        self.v: H = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: F = None
        self.x: B = None
        self.w: J = None
        self.y: A = None
        self.p: I = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.r: F = None
        self.q: I = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: J = None
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.w: A = None
        self.q: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: E = None
        self.q: D = None
        self.z: J = None
        self.r: D = None
        self.p: I = None
        self.v: H = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: F = None
        self.x: B = None
        self.w: J = None
        self.y: A = None
        self.p: I = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.r: F = None
        self.q: I = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: J = None
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.w: A = None
        self.q: H = None
        self.txt = txt

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

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