class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.o: J = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: G = None
        self.q: E = None
        self.s: A = None
        self.x: J = None
        self.p: A = None
        self.z: E = None
        self.y: B = None
        self.t: D = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.r: F = None
        self.q: E = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: I = None
        self.q: C = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: I = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: G = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: J = None
        self.u: G = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: D = None
        self.r: G = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

c = A("c")
l = B("l")
e = C("e")
m = D("m")
i = E("i")
d = F("d")
j = G("j")
n = H("n")
f = I("f")
a = J("a")

c.u = l
c.v = j
c.o = a
c.t = m
l.t = j
e.v = c
e.s = c
e.p = c
e.u = j
e.q = i
e.z = i
e.x = a
e.y = l
e.t = m
e.o = f
m.v = c
m.p = d
m.r = d
m.q = i
m.y = e
m.o = j
i.w = n
i.y = f
i.q = e
i.t = a
d.u = f
j.x = d
j.s = f
j.w = c
j.z = e
n.z = e
n.w = j
n.s = a
f.r = j
f.u = j
f.t = j
f.p = a
a.t = n
a.y = m
a.r = j
a.x = e
a.p = l
assert a.y.y.u.z.u.x.u.r.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.o: J = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: G = None
        self.q: E = None
        self.s: A = None
        self.x: J = None
        self.p: A = None
        self.z: E = None
        self.y: B = None
        self.t: D = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.r: F = None
        self.q: E = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: I = None
        self.q: C = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: I = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: G = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: J = None
        self.u: G = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: D = None
        self.r: G = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

c = A("c")
l = B("l")
e = C("e")
m = D("m")
i = E("i")
d = F("d")
j = G("j")
n = H("n")
f = I("f")
a = J("a")

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